-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One tap login not working #161
Comments
Howdy, |
Hi, Looks like firebaseui.auth.CredentialHelper.GOOGLE_YOLO is actually a string. So in your firebeasui-web-react config instead of credentialHelper: firebaseui.auth.CredentialHelper.GOOGLE_YOLO Seems to be working for me so far. I.E does the google one tap login in Chrome. |
Try importing firebaseui: import * as firebaseui from 'firebaseui' |
This does not work as it generates window not defined error on next js. |
Could you please share a code block or demo.. as it still doesn't work even after manually adding 'googleyolo' to credentialHelper. |
You cannot SSR FirebaseUI. See firebase/firebaseui-web#213 You could do something like this: const FirebaseAuth = () => {
const [renderAuth, setRenderAuth] = useState(false)
useEffect(() => {
if (typeof window !== 'undefined') {
setRenderAuth(true)
}
}, [])
return (
<div>
{renderAuth ? (
<StyledFirebaseAuth uiConfig={uiConfig} firebaseAuth={firebaseApp.auth()} />
) : null}
</div>
)
} Also, you need to import FirebaseUI as: import * as firebaseui from 'firebaseui' |
Hi @trueman1 it would be something like this: const firebaseAuthConfig = { }, But there is more to it than the above. the ENV_VAR_FOR_YOUR_GOOGLEAUTHPROVIDER_CLIENT_ID would be your GOOGLEAUTHPROVIDER_CLIENT_ID You'll need to setup on Google Cloud Platform a Google API client ID |
Hi,
When trying to add one tap login to the config, React throws an undefined error
credentialHelper: firebaseui.auth.CredentialHelper.GOOGLE_YOLO
How to fix?
The text was updated successfully, but these errors were encountered: