This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 387
Conversation
This file contains 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
rezaansyed
force-pushed
the
introduce-token-exchange-api
branch
5 times, most recently
from
November 7, 2023 20:44
8efb29d
to
1426e37
Compare
paulomarg
reviewed
Nov 8, 2023
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.
Love it! I'll let the team review it as well, but I can't see anything I'd change other than the ShopifyAuth
types.
packages/shopify-api/lib/auth/oauth/__tests__/create-session.test.ts
Outdated
Show resolved
Hide resolved
rezaansyed
force-pushed
the
introduce-token-exchange-api
branch
from
November 10, 2023 17:02
bc6221a
to
4938aa3
Compare
rezaansyed
force-pushed
the
introduce-token-exchange-api
branch
from
November 10, 2023 19:46
515ef57
to
b43d109
Compare
paulomarg
approved these changes
Nov 13, 2023
strA: string | {[key: string]: string} | string[] | number[], | ||
strB: string | {[key: string]: string} | string[] | number[], | ||
) => boolean; | ||
|
||
export function safeCompare( |
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.
Total nit, but we could export this as an arrow function so we don't have to repeat the types:
Suggested change
export function safeCompare( | |
export const safeCompare: SafeCompare = (strA, strB) => { |
rezaansyed
force-pushed
the
introduce-token-exchange-api
branch
from
November 13, 2023 14:33
b43d109
to
4fce514
Compare
5 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
WHY are these changes introduced?
Introduces token exchange API. The API to fetch access tokens is based on the Token Exchange spec:
Parameters:
client_id
client_secret
grant_type
urn:ietf:params:oauth:grant-type:token-exchange
indicates that a token exchange is being performed. Not required for authorization code grant flowsubject_token
subject_token_type
urn:ietf:params:oauth:token-type:id_token
indicates that the subject token type is an ID token.requested_token_type
urn:shopify:params:oauth:token-type:offline-access-token
(Default) andurn:shopify:params:oauth:token-type:online-access-token
are valid types for requesting offline & online access tokens, respectively.WHAT is this pull request doing?
Introduces API gated behind the
unstable_tokenExchange
future flag.Type of change
Checklist
yarn changeset
to create a draft changelog entry (do NOT update theCHANGELOG.md
file manually)