Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot login PWA (iOS) with e-mail or Nostr #727

Closed
Sebastix opened this issue Jan 2, 2024 · 7 comments · Fixed by #1818
Closed

Cannot login PWA (iOS) with e-mail or Nostr #727

Sebastix opened this issue Jan 2, 2024 · 7 comments · Fixed by #1818

Comments

@Sebastix
Copy link

Sebastix commented Jan 2, 2024

Description
I'm not able to login with the PWA installed on my iOS device. I've linked my Nostr and email as auth methods.

  • E-mail does not work, because the login link will not open the PWA and I'm not able to past the login URL in the PWA.
  • Login with Nostr is displaying the error message no nostr extension is found.

Environment:
If you only experience the issue on certain devices or browsers, provide that info.

  • Device: iPhone 12 Mini
  • OS: iOS
  • Browser: PWA (Safari)

Using Github Auth works for logging in (my least preferable way of loggin in).
The Lightning auth method also doesn't work on my side. When I copy-paste the lnurld url in my Thunderhub client I get a success message but SN is returning Auth failed. Try again or choose a different method.

@Sebastix Sebastix added the bug label Jan 2, 2024
@huumn
Copy link
Member

huumn commented Jan 2, 2024

Thanks for creating an issue! Both the email (an ios only problem) and nostr requiring an extension are known to us but we haven't put them here to track yet afaik.

Lightning Auth should work. When it fails to link, it's usually because that lightning auth has been linked to another account.

@Sebastix
Copy link
Author

Sebastix commented Jan 2, 2024

@huumn I tried to login with Lightning in the past, but is was not connected to my account so I disconnected it.
So yes, it could be linked to another SN account now (which I'm not using). How could I restore this?

@ekzyis
Copy link
Member

ekzyis commented Jan 2, 2024

Both the email (an ios only problem) and

I wonder if we could and should fix that by not only having a magic link as provided by Next-Auth but also a login code which iOS users can copy and manually paste into the PWA.

nostr requiring an extension are known to us

Not sure if this is fixable by us on mobile. I think someone needs to write a "nostr login app" or something which would open and sign an event if you click on a QR code like for LNURL-auth.

Or is it possible to have a nostr extension on mobile?

Lightning Auth should work. When it fails to link, it's usually because that lightning auth has been linked to another account.

We could mention that it might have failed because it was linked to another account in every case. So we wouldn't leak information about an account but just be more helpful in our error message.

@huumn
Copy link
Member

huumn commented Jan 2, 2024

I wonder if we could and should fix that by not only having a magic link as provided by Next-Auth but also a login code which iOS users can copy and manually paste into the PWA.

We can and we should yes. :)

Not sure if this is fixable by us on mobile.

We can do this by sending a DM with a magic link!

@ekzyis
Copy link
Member

ekzyis commented Jan 2, 2024

We can do this by sending a DM with a magic link!

Oof, DMs on nostr, don't get me started haha. But yes, I think this could indeed be a very nice way to login without compromising too much on security. I haven't considered using nostr DMs yet.

@Sebastix
Copy link
Author

Sebastix commented Jan 4, 2024

image

Too bad that a Safari extension (Nostore in action in iOS Safari above in the screenshot) is not working in a PWA for Nostr event signing

Sending a token to the user to be used in the PWA (such for logging in) seems to me the best solution for now.

I'm curious, is the Nostr auth part of the next-auth package?

@huumn
Copy link
Member

huumn commented Jan 4, 2024

I'm curious, is the Nostr auth part of the next-auth package?

We hacked it in as a credential provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants