-
Notifications
You must be signed in to change notification settings - Fork 125
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
Make device auth the default authentication method #4092
Conversation
Thanks for your contribution! Depending on what you are working on, you may want to request a review from a Shopify team:
|
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/constants.d.ts@@ -3,6 +3,7 @@ export declare const environmentVariables: {
alwaysLogAnalytics: string;
alwaysLogMetrics: string;
deviceAuth: string;
+ accessCodeAuth: string;
enableCliRedirect: string;
env: string;
firstPartyDev: string;
packages/cli-kit/dist/public/node/environment.d.ts@@ -35,7 +35,7 @@ export declare function getOrganization(): string | undefined;
*/
export declare function getBackendPort(): number | undefined;
/**
- * Returns the information of the identity token.
+ * Returns the information of the identity & refresh tokens, provided by environment variables.
*
* @returns The identity token information in case it exists.
*/
packages/cli-kit/dist/public/node/context/local.d.ts@@ -74,6 +74,8 @@ export declare function firstPartyDev(env?: NodeJS.ProcessEnv): boolean;
/**
* Returns true if the CLI should use device auth.
*
+ * Device auth can be opted out by using SHOPIFY_CLI_ACCESS_CODE_AUTH.
+ *
* @param env - The environment variables from the environment of the current process.
* @returns True if SHOPIFY_CLI_DEVICE_AUTH is truthy or the CLI is run from a cloud environment.
*/
|
Coverage report
Show files with reduced coverage 🔻
Test suite run success1712 tests passing in 794 suites. Report generated by 🧪jest coverage report action from f76debd |
WHY are these changes introduced?
Closes https://github.com/Shopify/develop-app-inner-loop/issues/1835
WHAT is this pull request doing?
Device auth is now the default, with an opt-out via an environment variable
How to test your changes?
Log out of the CLI (shopify auth logout), and start using normal commands.
Measuring impact
How do we know this change was effective? Please choose one:
Checklist
dev
ordeploy
have been reflected in the internal flowchart.