UNPKG

voluptasmollitia

Version:
35 lines (20 loc) 1.1 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [SAMLAuthProvider](./auth.samlauthprovider.md) &gt; [credentialFromResult](./auth.samlauthprovider.credentialfromresult.md) ## SAMLAuthProvider.credentialFromResult() method Generates an [AuthCredential](./auth.authcredential.md) from a [UserCredential](./auth.usercredential.md) after a successful SAML flow completes. <b>Signature:</b> ```typescript static credentialFromResult(userCredential: UserCredential): AuthCredential | null; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | userCredential | [UserCredential](./auth.usercredential.md) | | <b>Returns:</b> [AuthCredential](./auth.authcredential.md) \| null ## Remarks For example, to get an [AuthCredential](./auth.authcredential.md)<!-- -->, you could write the following code: ```js const userCredential = await signInWithPopup(auth, samlProvider); const credential = SAMLAuthProvider.credentialFromResult(userCredential); ```