[Archive] How to add referrer in an ionic capacitor app

Openlogin cannot verify mobile origins, so you need to host a webpage for your app which and pass the URL of that webpage in the openloginAdapter loginSettings param as shown below and from you webpage, you can redirect to your mobile app.

The flow will look like this:-

Your app (using web3auth sdk) =>(Redirects to) => Openlogin.com (user will complete login here) => (After login, Redirects to your webpage) => Your hosted webpage =>(Redirects to) => Your IONIC app

Sample Code:-


const openloginAdapter = new OpenloginAdapter({
“loginSettings”: {
“redirectUrl”: “your web page url”
}
})

web3auth.configureAdapter(openloginAdapter)

Note: You will need to whitelist your webpage url rather thn mobile app uri in this case.



Originally posted by: himanshuchawla009