Third-party auth providers
Learn how to integrate with third-party auth provider.
Openfort's embedded wallets are fully-compatible with any authentication provider that supports JWT-based, stateless authentication.
To make these instructions concrete, this guide uses Firebase as a sample third party auth provider.
First, follow the guide on how to configure third party authentication.
The supported authentication providers are ACCELBYTE
, CUSTOM
, FIREBASE
, SUPABASE'
, LOOTLOCKER
, PLAYFAB
and 'OIDC'
.
You will need to call the authenticateWithThirdPartyProvider
method:
_10import {ThirdPartyOAuthProvider, TokenType} from "@openfort/openfort-js";_10_10await openfort.authenticateWithThirdPartyProvider({_10 provider: ThirdPartyOAuthProvider.FIREBASE,_10 token: "YOUR_USER_AUTH_TOKEN",_10 tokenType: TokenType.ID_TOKEN, // or CUSTOM_TOKEN_10});
Upon successful authentication, the SDK will return a Player
object that contains the linked accounts. For example, if you used Firebase as the third-party provider, the response will look like this: