near / near-wallet

Web wallet for NEAR Protocol which stores keys in browser's localStorage
https://wallet.near.org
MIT License
218 stars 174 forks source link

Redirect not working for new users onboarded via login button #1651

Closed stefanopepe closed 3 years ago

stefanopepe commented 3 years ago

Problem Users can land on NEAR Wallet via the login with NEAR button on third-party dapps (see https://awesomenear.com/ for some examples). However, some users may not have yet a NEAR wallet, so instead of the authorization page they see the wallet home with the buttons Create Account or Import Existing Account.

If the user begins this process, the final step will lead them to the wallet dashboard, instead of continuing the login path and redirecting them to the app that originated this process. This issue reduces dapps' onboarding retention, and impacts the correct tracking

Expected Behavior A user should be able to complete the onboarding and, once the account is created, be redirected to the authorization page, or (better) asked if they want to get back to %dapp% as soon as the account is ready.

Steps to reproduce

  1. Open an incognito window on the browser
  2. Open one of the Login with NEAR dapps from the many available at https://awesomenear.com/ (e.g. the Rainbow Bridge)
  3. Land on the wallet homepage and complete the onboarding
  4. Go back to the initial application and click again Login
Patrick1904 commented 3 years ago

I believe this used to redirect to /login after account creation. @marcinbodnar is this something you can look into?

stefanopepe commented 3 years ago

Just need to know if it's a bug, and previously was working differently

marcinbodnar commented 3 years ago

Just need to know if it's a bug, and previously was working differently

@jimmy3dita I will check it out.

marcinbodnar commented 3 years ago

@jimmy3dita so it's not a bug, it was never working properly, but I'm on it right now and make it work.