Replies: 1 comment 15 replies
-
|
Hi @bastifix, const signInWithMicrosoft = async () => {
// 1. Create credentials on the native layer
const result = await FirebaseAuthentication.signInWithMicrosoft();
// 2. Sign in on the web layer using the id token and nonce
const provider = new OAuthProvider('microsoft.com');
const credential = provider.credential({
idToken: result.credential?.idToken,
});
const auth = getAuth();
auth.onAuthStateChanged(user => {
console.log('User: ' + user);
});
await signInWithCredential(auth, credential);
}; |
Beta Was this translation helpful? Give feedback.
15 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I want to use Microsoft Azure AD Accounts to login into the web layer. For Google-Login best practice seems to use code like this:
Unfortunately Microsoft doesn't support
signInWIthCredentialhttps://cloud.google.com/identity-platform/docs/web/microsoft?hl=en --> so it seems not possible for me to sign in to the web layer?Here: https://stackoverflow.com/questions/63678222/how-to-implement-microsoft-login-with-firebase-in-react-native#63693445
is suggested to use
signInWithCustomTokenbut it was not possible for me to create a customToken while using a callable cloud function from the not signed in user. Here my cloud function code:Calling this function ended in an error 302.
Would love some ideas how to sign users in to the web layer with Microsoft ;-)
Beta Was this translation helpful? Give feedback.
All reactions