wavlake / mobile

MIT License
7 stars 0 forks source link

[MOBILE] Bridge COM users to mobile app #129

Closed joshr4 closed 3 months ago

joshr4 commented 5 months ago

Login flow for mobile app

  1. Login button in mobile app will take the user to a new page where they can enter their nsec or generate a new one
  2. Once an nsec is created, it is used to sign an ephemeral "auth event" that is stringifed and added as a query param to a wavlake.com/login url
  3. The user's mobile browser is launched with this url
  4. Once on the .com login page, the user logs in or signs up for a legacy .com account (or is already logged in)
  5. .com will see the event query param, parse it, validate the signature and timestamp, and make an API call to associate the npub to the legacy user account.
  6. On success, .com will launch the app again
  7. The app will open and request legacy user data from the wavlake API using the npub identifier
  8. The app will display the user data, if any (playlists etc)