-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add authorizationParams to Token Vault authorizer params+interrupt
#296
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
Conversation
authorizationParams to Token Vault authorizer+interruptauthorizationParams to Token Vault authorizer params+interrupt
| requiredScopes: string[], | ||
| behavior: "resume" | "reload" = "resume" | ||
| ) { | ||
| constructor(message: string, params: { |
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.
I'm changing the ctor shape, which is only an internal breaking change (instantiating this interrupt should always be done internally to our libraries, not by any consumers).
| connection, | ||
| scopes, | ||
| [...currentScopes, ...scopes] | ||
| `Authorization required to access the Token Vault: ${this.params.connection}. Authorized scopes: ${currentScopes.join(", ")}. Missing scopes: ${missingScopes.join(", ")}`, |
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.
I found it helpful to see the currently-authorized scopes in the error message while troubleshooting.
| */ | ||
| public readonly authorizationParams: Record<string, string>; | ||
|
|
||
| public behavior: "resume" | "reload"; |
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.
| public behavior: "resume" | "reload"; | |
| public readonly behavior: "resume" | "reload"; |
should this be readonly too?
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.
added ✔️
cbcaab1 to
c6d6e3d
Compare
|
🎉 This PR is included in version @auth0/ai-v5.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @auth0/ai-llamaindex-v4.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @auth0/ai-vercel-v4.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This is the first step step in deploying the connected accounts feature. For this PR, we are simply adding the
authorizationParamsfield to theTokenVaultInterruptandTokenVaultParams. This will allow to start to specify theauthorizationParamsat thewithTokenVault()calls like this:The goal is for the
<TokenVaultConsent>to have access to those params when handle theTokenVaultInterrupt, and eventually trigger a connect account flow. For now, this change is non-breaking because the current<TokenVaultConsent>module ignores this field and will continue to leverage the/authorizationflow.Next iteration of this change will land in: #291
References
Testing
Checklist