-
Notifications
You must be signed in to change notification settings - Fork 11
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
Design requirements for API free YPP signup Authorisation Flow #316
Comments
|
Sure, here is the end-to-end workflow as a sequence diagram. Previously, to keep the issue simple, I only documented those steps that changed from api to api-free signup The request & response JSON schemas are shown below (separately from the sequence diagram) API Interaction Workflow Sequence DiagramsequenceDiagram
participant Creator
participant Atlas
participant YT-synch
participant Faucet
participant Orion
participant RPC
Creator->>Atlas: [1] Enter Youtube Video URL
Note right of Atlas: Verify Channel request
Atlas->>YT-synch: [2] POST /users {youtubeVideoUrl: "string"}
Note right of YT-synch: Verify channel
YT-synch-->>Atlas: [3] Response {id, channelHandle, ..., memberId}
alt memberId is undefined
Atlas-->>Creator: [4] Show mnemonic/seed phrase
Note right of Atlas: Create membership request
Atlas->>YT-synch: [5] POST /membership {id, youtubeVideoUrl, ...}
YT-synch->>Faucet: [6] Captcha-free membership request
Note right of YT-synch: Forward to Faucet
Faucet-->>YT-synch: [7] Response {membershipId}
YT-synch-->>Atlas: [8] Response {id, youtubeVideoUrl, ...}
else memberId is not undefined
Atlas-->>Creator: [4] Ask user to enter mnemonic phrase saved in the previous signup attempt to the external signer
end
Atlas-->>Creator: [9] Ask for email address
Atlas-->>Creator: [10] Ask for account password
Note right of Atlas: Create Orion account (See JSON Schema 3)
Atlas->>Orion: [11] POST /account {signature, payload: {joystreamAccountId, ...}}
Orion-->>Atlas: [12] Account creation confirmation { "success": true }
Atlas->>RPC: [13] Create or Update Joystream channel (See JSON Schema 4)
RPC-->>Atlas: [14] Channel creation/update confirmation
Note right of Atlas: Channel Association Request (See JSON Schema 5)
Atlas->>YT-synch: [15] POST /channels {youtubeVideoUrl, id, ...}
YT-synch-->>Atlas: [16] Channel association confirmation
JSON Schemas1. Verify Channel RequestPOST /users {
"youtubeVideoUrl": "string"
} Response: {
"id": "string", # YT channel Id
"channelHandle": "string",
"channelTitle": "string",
"channelDescription": "string",
"channelLanguage": "string",
"avatarUrl": "string",
"bannerUrl": "string",
"memberId": "string" // Membership Id (if already created in the previous signup attempt for the same channel by calling "POST /membership" endpoint)
} 2. Create Membership RequestPOST /membership {
"id": "string", # YT channel Id
"youtubeVideoUrl": "string",
"account": "string",
"handle": "string",
"avatar": "string",
"about": "string",
"name": "string"
} Response: {
"memberId": 0,
"handle": "string"
} 3. Create Orion AccountPOST /account {
"signature": "string",
"payload": {
"joystreamAccountId": "string",
"gatewayName": "string",
"timestamp": 0,
"action": "createAccount",
"memberId": "string",
"email": "string",
"encryptionArtifacts": {
"id": "string",
"encryptedSeed": "string",
"cipherIv": "string"
}
}
} Response: {
"success": true
} 4. Create or Update Joystream ChannelRPC Call {
"collaboratorId": "string",
...
} Response: Channel creation/update confirmation 5. Channel Association RequestPOST /channels {
"youtubeVideoUrl": "string",
"id": "string", # YT channel Id
"email": "string",
"joystreamChannelId": 0,
"shouldBeIngested": true,
"videoCategoryId": "string",
"referrerChannelId": 0
} Response: {
"confirmation": "Channel association confirmation"
}
As shown in the signup flow, the YT channel will be verified by the YT-synch BE using the
if the Orion account (and JS membership) already exists then the signup flow would be:
|
Hey @zeeshanakram3 @bedeho I have a few questions related to these flows
|
No,
Yes, correct this flow will still exist, in fact, in this flow there should be an option for the creator to pick the language too
Well, I am unfamiliar with the design approach, so it was only my idea (i.e. asking for the video URL in "requirements" modal). I think you should design the flow as you think is the best. |
@zeeshanakram3 @bedeho Hey I designed 2 new modals one for the entering Youtube video URL and one when the authorization fails. Please let me know your feedback, If approved - then I'm gonna update the user stories etc. |
@msmadeline the footer text Also, there will probably be a couple of new API calls/flows to properly handle failure cases (that I mistakenly omitted). I will add that too in the above sequence diagram in a while. So probably designs might change a bit due to that. |
Hey @bedeho @zeeshanakram3 I recorded a quick loom video where I present the new user stories and designs that I made so far. Please let me know If I miss anything and looking forward to your feedback ✅ 🎥 loom: https://www.loom.com/share/bb8a3562258b4ceaa34202ba6d71f0f9?sid=6df657ac-88c4-48d3-9296-bac77f3ec881 |
This Issue describes the design changes required due to API-free YPP signup Authorisation Flow (#314), which is implemented in #315
In current YPP signup workflow, we have
Sign up with Google
buttonIn the new singup workflow, We would have a button for
Enter Youtube video URL
After clicking on the
Enter Youtube video URL
, a modal can be displayed which would have a text field to enter Youtube video URL and info about the requirements of that video:I want to be in YPP
"I think these requirements can be displayed in the modal that currently appears after clicking on
Sign up with Google
After creator enters the video URL the request would be sent to the YT-synch backend, and there are two possible outcomes
Authorization Failed
modal:I want to be in YPP
"The text was updated successfully, but these errors were encountered: