fixes
This commit is contained in:
@@ -60,37 +60,33 @@ const providers: Provider[] = [
|
||||
const credential = GoogleAuthProvider.credential(result.credential?.idToken)
|
||||
await signInWithCredential(auth, credential)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'microsoft',
|
||||
icon: 'fa-brands fa-microsoft',
|
||||
signin: async () => {
|
||||
const result = await FirebaseAuthentication.signInWithMicrosoft({
|
||||
mode: 'redirect'
|
||||
})
|
||||
const provider = new OAuthProvider('microsoft.com')
|
||||
const credential = provider.credential({
|
||||
idToken: result.credential?.idToken,
|
||||
rawNonce: result.credential?.nonce
|
||||
})
|
||||
await signInWithCredential(auth, credential)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'github',
|
||||
icon: 'fa-brands fa-github',
|
||||
signin: async () => {
|
||||
const result = await FirebaseAuthentication.signInWithGithub({
|
||||
mode: 'redirect'
|
||||
})
|
||||
const provider = new OAuthProvider('github.com')
|
||||
const credential = provider.credential({
|
||||
idToken: result.credential?.idToken,
|
||||
rawNonce: result.credential?.nonce
|
||||
})
|
||||
await signInWithCredential(auth, credential)
|
||||
}
|
||||
}
|
||||
// {
|
||||
// name: 'microsoft',
|
||||
// icon: 'fa-brands fa-microsoft',
|
||||
// signin: async () => {
|
||||
// const result = await FirebaseAuthentication.signInWithMicrosoft({
|
||||
// mode: 'redirect'
|
||||
// })
|
||||
// const provider = new OAuthProvider('microsoft.com')
|
||||
// // const credential = provider.credential({
|
||||
// // idToken: result.credential?.idToken,
|
||||
// // rawNonce: result.credential?.nonce
|
||||
// // })
|
||||
// if (result.credential) {
|
||||
// const credential = provider.credential(result.credential)
|
||||
// console.log(credential)
|
||||
// try {
|
||||
// const user = await signInWithCredential(auth, credential)
|
||||
// console.log('user', user)
|
||||
// } catch (error: any) {
|
||||
// console.log(error)
|
||||
// console.log('message', error.message)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// Microsoft users can't be signed in manually so this does not work on native
|
||||
]
|
||||
// type Provider = (typeof providers)[number]
|
||||
const signInWithProvider = async (provider: Provider) => {
|
||||
|
||||
Reference in New Issue
Block a user