Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const SignInForm = () => {
const auth = useAuth();
const uiConfig = {
signInFlow: 'popup',
signInOptions: [auth.GoogleAuthProvider.PROVIDER_ID],
callbacks: {
// Avoid redirects after sign-in.
signInSuccessWithAuthResult: () => false
}
};
return ;
};
const UserDetails = ({ user }) => {
const auth = useAuth();
return (
<>
<h3>Displayname: {user.displayName}</h3>
<h3>Providers:</h3>
<ul>
{user.providerData.map(profile => (
<li>{profile.providerId}</li>
))}
</ul>
<button> signOut(auth)}>Sign Out</button>
);
};