-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: external login #1629
feat: external login #1629
Conversation
@@ -41,7 +41,7 @@ export const AuthorizationRequest = Schema.struct({ | |||
/** | |||
* DID of the Account authorization is requested from. | |||
*/ | |||
iss: Account, | |||
iss: Account.optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now optional, as per the RFC.
In the case of OAuth login, we don't know the email address of the user until after they have authorized and we have issued the delegation and attestation on their behalf.
@@ -21,6 +21,10 @@ export const provide = (ctx) => | |||
* @returns {Promise<API.Transaction<API.AccessAuthorizeSuccess, API.AccessAuthorizeFailure>>} | |||
*/ | |||
export const authorize = async ({ capability, invocation }, ctx) => { | |||
if (!capability.nb.iss) { | |||
return Server.error(new Error('Issuer is required in invoked authorization request.')) | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For regular email login we require issuer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
🤖 I have created a release *beep* *boop* --- ## [18.1.0](capabilities-v18.0.1...capabilities-v18.1.0) (2025-02-25) ### Features * external login ([#1629](#1629)) ([150b5d7](150b5d7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [20.2.0](access-v20.1.2...access-v20.2.0) (2025-02-25) ### Features * external login ([#1629](#1629)) ([150b5d7](150b5d7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [17.2.0](w3up-client-v17.1.2...w3up-client-v17.2.0) (2025-02-25) ### Features * external login ([#1629](#1629)) ([150b5d7](150b5d7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [19.1.0](upload-api-v19.0.0...upload-api-v19.1.0) (2025-02-25) ### Features * external login ([#1629](#1629)) ([150b5d7](150b5d7)) ### Other Changes * upgrade dependencies for better de-duplication ([#1620](#1620)) ([fa90a01](fa90a01)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: ash <alan@storacha.network>
Allows login via github via: ```sh w3 login --github ``` refs storacha/RFC#43 depends on storacha/w3up#1629
refs storacha/RFC#43
This PR adds a new method
externalLogin()
that allow login to the system via an external method (e.g. OAuth). It essentially bypasses email confirmation, assuming this is done out of band. We re-join the regular auth flow at the point when we claim the delegation (and attestation) from an email to the agent.