Hi, I want to integrate native login into my react native app, I dont want to redirect the user to an external browser (due to apple tracking issues and also its more convenient).
So far I’ve an access token from the native login but I don’t know how I’ll connect that token with web3auth. Also I would want to keep the current accounts so the change would be seamless in theory.
I see that I can implement that with corekit using an idToken but I dont want to lose all my users from plug-in-play. Also, due to how Google APIs work, I don’t even know if I can move to web someday because of its weird OAuth2 credentials.
Hey @thalles.passos you can use custom authentication with PnP as well, checkout the documentation. For the second issue of keeping the current accounts, that won’t be possible. The accounts are based on the verifiers you used, either global verifiers, or your custom verifiers. You can promote users for migrating their assets.
That’s sad, really wanted to keep the global verifiers but okay. Another question, Google requires different type of OAuth credentials:
If I create an "Android’ application type (required for native login) and then later I move my app to the web which requires “Web application” can I somehow keep the current accounts? Basically keeping both of them active but with same accounts.
And also, I’m now trying to use the Plug in Play as suggested but it seems that it requires a browser even tho I’ve an id token already, what can I do?
const web3auth = new Web3Auth(WebBrowser, EncryptedStorage, {
clientId,
// IMP START - Whitelist bundle ID
redirectUrl,
// IMP END - Whitelist bundle ID
network: OPENLOGIN_NETWORK.SAPPHIRE_DEVNET, // or other networks
loginConfig: {
google: {
verifier: 'teste',
typeOfLogin: 'google',
clientId:
'556053249389-ci4a8910i2qlbmndjn2me1gbrav8peoh.apps.googleusercontent.com',
},
},
});