Skip to content

Instantly share code, notes, and snippets.

@heytulsiprasad
Last active June 11, 2021 16:55
Show Gist options
  • Select an option

  • Save heytulsiprasad/b605d244b29887c364fc8bdeb58033ec to your computer and use it in GitHub Desktop.

Select an option

Save heytulsiprasad/b605d244b29887c364fc8bdeb58033ec to your computer and use it in GitHub Desktop.
Basic sign in using third party auth provider using Firebase
export const signInUserWithAuthProvider = async (
authProvider: AuthProvider
) => {
firebase.auth().tenantId = authProvider.tenantId;
const provider = new firebase.auth.SAMLAuthProvider(authProvider.provider);
firebase.auth().signInWithRedirect(provider);
const authResult = await firebase.auth().getRedirectResult();
return authResult;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment