Aptogotchi: Integrate Aptos Keyless Accounts
Open Github Page
Introduction to Aptos Keyless
Aptogotchi Demo
Integration Steps
Configure your OpenID Integration
Install Aptos Typescript SDK
Setup Ephemeral Keys
Setup Login Button
Create Callback Page
Instantiate Keyless Account
More Resources
Aptos Developer Docs
Setup Login Button
Setting up the OAuth flow
- Remove all mentions of
@aptos-labs/wallet-adapter-react
and insert the code logic below within theWalletButtons
component.- You can also remove
WalletProvider
from the root layout.
- You can also remove
- Prepare the URL params of the login URL.
- Set the
redirect_uri
andclient_id
to your configured values with the IdP. - Set the
nonce
to the nonce of theEphemeralKeyPair
from the previous step.
- Set the
- Construct the login URL for the user to authenticate with the IdP.
- Make sure the
openid
scope is set. Other scopes such asemail
andprofile
can be set based on your app’s needs.
- Make sure the
- When the user clicks the login button, redirect the user to the
redirectUrl
that you just created.