Home > @firebase/auth > SAMLAuthProvider > credentialFromResult
SAMLAuthProvider.credentialFromResult() method
Generates an AuthCredential from a UserCredential after a successful SAML flow completes.
Signature:
static credentialFromResult(userCredential: UserCredential): AuthCredential | null;
Parameters
Parameter | Type | Description |
---|---|---|
userCredential | UserCredential |
Returns:
AuthCredential | null
Description
For example, to get an AuthCredential, you could write the following code:
const userCredential = await signInWithPopup(auth, samlProvider);
const credential = SAMLAuthProvider.credentialFromResult(userCredential);