Re-wire auth to use a provider pattern. Lots of tests remove cloud references#3230
Open
GiantRobots wants to merge 7 commits intomainfrom
Open
Re-wire auth to use a provider pattern. Lots of tests remove cloud references#3230GiantRobots wants to merge 7 commits intomainfrom
GiantRobots wants to merge 7 commits intomainfrom
Conversation
…weirdness in control flow.
…ve single points of access
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| settings, | ||
| accessToken, | ||
| }); | ||
|
|
Contributor
There was a problem hiding this comment.
⚠️ Argument of type 'EventAttribute | IFailure | PotentiallyDecodable' is not assignable to parameter of type 'Optional<WorkflowEvent | EventAttribute | PotentiallyDecodable>'.
| accessToken, | ||
| }); | ||
|
|
||
| const decodedAttributes = decodeAttributes( |
Contributor
There was a problem hiding this comment.
⚠️ Argument of type 'EventAttribute | IFailure | PotentiallyDecodable' is not assignable to parameter of type 'Optional<WorkflowEvent | EventAttribute | PotentiallyDecodable>'.
| settings, | ||
| accessToken, | ||
| ); | ||
|
|
Contributor
There was a problem hiding this comment.
⚠️ Object is possibly 'null' or 'undefined'.⚠️ Object is possibly 'null' or 'undefined'.
| accessToken, | ||
| ); | ||
|
|
||
| expect(decodedHeartbeatDetails[0].heartbeatDetails.payloads[0]).toBe(2); |
Contributor
There was a problem hiding this comment.
⚠️ Object is possibly 'null' or 'undefined'.⚠️ Object is possibly 'null' or 'undefined'.
| headers['Authorization-Extras'] = accessTokenExtras; | ||
| const accessToken = await getAccessToken(); | ||
| const idToken = await getIdToken(); | ||
| if (accessToken) { |
Contributor
There was a problem hiding this comment.
⚠️ Element implicitly has an 'any' type because expression of type '"Authorization"' can't be used to index type '{ 'Content-Type': string; 'X-Namespace': string; }'.
| if (accessToken) { | ||
| headers['Authorization'] = `Bearer ${accessToken}`; | ||
| } | ||
| if (idToken) { |
Contributor
There was a problem hiding this comment.
⚠️ Element implicitly has an 'any' type because expression of type '"Authorization-Extras"' can't be used to index type '{ 'Content-Type': string; 'X-Namespace': string; }'.
Contributor
|
| settings, | ||
| $authUser.accessToken, | ||
| ); | ||
| const decodedAttributes = decodePayloadAttributes( |
Contributor
There was a problem hiding this comment.
⚠️ Argument of type 'WorkflowEvent | EventAttribute | IMemo | PotentiallyDecodable' is not assignable to parameter of type 'Optional<WorkflowEvent | EventAttribute | PotentiallyDecodable>'.
…Re-wire with-access-token to use pre/post hooks so code paths can be determined by the caller. Lots of tests
| ...init.options, | ||
| headers: withCallerType(init.options?.headers), | ||
| }, | ||
| }; |
Contributor
There was a problem hiding this comment.
⚠️ Type 'RequestContext' is not assignable to type '{ url: string; options: { headers: Record<string, string>; body?: BodyInit | null; cache?: RequestCache; credentials?: RequestCredentials; integrity?: string; keepalive?: boolean; ... 7 more ...; window?: null; }; }'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description & motivation 💭
Screenshots (if applicable) 📸
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?