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

App & user invites #64

Open
GBKS opened this issue Oct 23, 2023 · 2 comments
Open

App & user invites #64

GBKS opened this issue Oct 23, 2023 · 2 comments
Labels
new feature New feature

Comments

@GBKS
Copy link
Owner

GBKS commented Oct 23, 2023

Is it possible that other clients can outsource their profile creation to Nosta? They might create a deep-link into the account creation flow with a custom message, client name and logo. Then they would use the regular Nosta flow. At the end, the user would get sent back to the other client.

The tricky part is of course where the keys reside. Getting set up and logged in on Nosta does not log the user in on the other client. If Nosta held the key for the user, it could also serve as an auto-signer, but that does not seem right. If the user installs an extension, the key is then easily carried over to sign in to the other client. Not 100% sure there.

And would this be possible somehow using NIP-89, which defines events for app details and recommendations?

The Nosta profile creation flow is not optimized for other clients who might have unique features for blogging, e-commerce, etc. So this would not be ideal for everyone, but maybe there are enough situations where this would be helpful.

@GBKS GBKS added the new feature New feature label Oct 23, 2023
@GBKS
Copy link
Owner Author

GBKS commented Aug 24, 2024

A first version could simply return the private key as a URL parameter. Would make it easier to try out this functionality.

The flow might be as follows:

  1. App owner creates an invite link on a page on Nosta dedicated for this
  2. The app sends people to something like this https://nosta.me/appinvite?pubkey=<application-pubkey>
  3. Nosta loads that application profile and shows a screen that informs the user that they will set up their profile with Nosta and then be redirected to the other app
  4. User goes through profile setup
  5. User is informed that they will go back to the other app now. Nosta shows a link like this: https://otherapp.com/nsec=<user-private-key>
  6. Other app picks up the private key and logs them in

Not super great to pass the private key around, but maybe a better method will crystallize if this feature actually finds use.

While building this functionality, it might also be good to throw in user invites. So instead of another application being the inviter, it's another user.

  1. Logged in user has a Send invite button somewhere on their profile
  2. They send it to their friends, it's a link like https://nosta.me/invite?pubkey=<application-pubkey>&message=<personalized-message>
  3. The friend clicks the link
  4. Nosta loads the profile of the inviter and shows a screen that informs the friend that they will set up their profile with Nosta
  5. User goes through profile setup. The inviter will be their first follow
  6. What next...? Maybe send a DM? Or do an intro referencing the inviter?

These two could also be combined. I may want to invite someone to chat with me on some specific client. Clients who would want to support this then need to accept two parameters and handle them properly - the new users private key, and the inviters pub key.

I think this functionality makes a lot of sense. It's just going to be a bit finicky to piece together the flows, since there's a lot of overlap.

@GBKS GBKS changed the title External client profile setup handling App & user invites Aug 24, 2024
@GBKS
Copy link
Owner Author

GBKS commented Sep 2, 2024

Some quick mocks to illustrate the two ideas. All super rough.

image

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

No branches or pull requests

1 participant