Authenticate using Portkey Browser Extension
You can let your users authenticate with Portkey using their Portkey Browser Extension by using the Portkey SDK for sign-in flow. All signing of transactions will be done through the Portkey Browser Extension.
This is only available on WebGL.
Access the PortkeySDK.AuthService
The AuthService
class is the entry point for all authentication API calls. It is accessible through PortkeySDK.AuthService
.
IAuthService auth = PortkeySDK.AuthService;
Authenticate with PortkeySDK
- Log in the user directly through
AuthService
usingLoginWithPortkeyExtension
.
// mySuccessCallback will be called when the user successfully authenticated with Portkey Browser Extension.
StartCoroutine(PortkeySDK.AuthService.LoginWithPortkeyExtension(mySuccessCallback));
Next Steps
After the user has signed up or logged in, a DIDAccountInfo
will be returned that corresponds to the account that was used to log in within Portkey Browser Extension. DIDAccountInfo
contains signing key and account information that can be used to get a user's account balance and sign transactions.
Sign out
To sign out a user, call Logout
or disconnect from the Portkey Browser Extension.
StartCoroutine(PortkeySDK.AuthService.Logout());