near / fast-auth-signer

https://fast-auth-signer.vercel.app
MIT License
30 stars 9 forks source link

Email form appears twice on signin #122

Open DavidM-D opened 9 months ago

DavidM-D commented 9 months ago

When users log into near.org on Firefox (and possibly other browsers) they enter their email address, press enter and then a second identical form pops up, fills itself and the confirmation window pops up.

Double login

This is rather odd. I think we should either continue showing the original login page or show some sort of loading page. @nall-near what would you like to see instead of a second login page?

Pessina commented 9 months ago

The second form displayed is related to the AddDevice screen. I suggest adding a loading indicator instead of removing this screen, as it contains necessary logic.

I can also explore the possibility of completely removing this screen and integrating the AddDevice logic into the Login screen, but this would require further investigation.

nall-near commented 9 months ago

This is a good one @DavidM-D. @esaminu, has there been any progress made on this?

I believe this is happening because there is the near.org modal page that then needs to redirect to the wallet.near.org page to honor the url and and create a passkey.

It should work like:

  1. Click create account or sign in
  2. immediately launch FastAuth iFrame to input data

This is also relevant to moving the passkey creation to the end of the flow and the implementation of the iframe design.

Pessina commented 9 months ago

@nall-near , sorry, I might be mistaken.

As far as I understand, the flow you described is already in place, no?

  1. Click create account or sign in
  2. Immediately launch FastAuth iFrame to input data

From what I understood from @DavidM-D , the issue seems to be that we display two identical forms, where the second form doesn’t require any user action. The user sees this form and is then automatically redirected to the /verify-email page.

To enhance UX, we could either display a loading screen instead of the second form (easy solution) or remove the second forms page (needs further investigation).

Please correct if I'm wrong.

DavidM-D commented 9 months ago

I think you're both correct.

Jacob is suggesting that instead of keeping the first sign in and getting rid of the second page in the sign in, when you press sign in it should immediately redirect to the second page without showing the first.

This gives us greater flexibility when it comes to deciding where to show the passkey later on.

Pessina commented 9 months ago

Thanks @DavidM-D , now it's clear to me :)

nall-near commented 9 months ago

To clarify, I meant that once you select an option from near.org you should immediately launch the iframe

https://github.com/near/fast-auth-signer/assets/103140483/662811af-f172-4061-a0f7-9352ce87222d