MCPcopy Create free account
hub / github.com/NativeScript/firebase / credential

Method credential

packages/firebase-auth/index.ios.ts:797–815  ·  view source on GitHub ↗
(optionsOrIdToken: OAuthCredentialOptions | string | null, accessToken?: string)

Source from the content-addressed store, hash-verified

795 }
796
797 credential(optionsOrIdToken: OAuthCredentialOptions | string | null, accessToken?: string) {
798 let provider;
799 if (!optionsOrIdToken && accessToken) {
800 provider = FIROAuthProvider.credentialWithProviderIDAccessToken(this._providerId, accessToken);
801 } else if (optionsOrIdToken) {
802 if (typeof optionsOrIdToken === 'string') {
803 provider = FIROAuthProvider.credentialWithProviderIDAccessToken(this._providerId, optionsOrIdToken);
804 } else if (typeof optionsOrIdToken === 'object') {
805 if (optionsOrIdToken.idToken && !optionsOrIdToken.rawNonce) {
806 provider = FIROAuthProvider.credentialWithProviderIDIDTokenAccessToken(this._providerId, optionsOrIdToken.idToken, optionsOrIdToken.accessToken);
807 } else if (optionsOrIdToken.idToken && optionsOrIdToken.rawNonce) {
808 provider = FIROAuthProvider.credentialWithProviderIDIDTokenRawNonce(this._providerId, optionsOrIdToken.idToken, optionsOrIdToken.rawNonce);
809 } else {
810 provider = FIROAuthProvider.credentialWithProviderIDIDTokenRawNonceAccessToken(this._providerId, optionsOrIdToken.idToken, optionsOrIdToken.rawNonce, optionsOrIdToken.accessToken);
811 }
812 }
813 }
814 return OAuthCredential.fromNative(provider);
815 }
816}
817
818export class TwitterAuthProvider {

Callers

nothing calls this directly

Calls 1

fromNativeMethod · 0.45

Tested by

no test coverage detected