Skip to content

Read URL and token from config #183

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

Merged
merged 2 commits into from
Mar 3, 2023
Merged

Read URL and token from config #183

merged 2 commits into from
Mar 3, 2023

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Mar 2, 2023

In case the user has already configured the CLI. This will only happen
without user input until the first successful connection.

After that the "use existing token" checkbox must be used to read the
token from the config. It will only be used if it matches the URL.

A secondary effect of the checkbox is that it will not open the browser
window so it can also be used in the case where you already have a token
you want to use but it is not in the CLI config.

Lastly I removed some padding in an attempt to regain the space lost by
the additions.

existing

Closes #166

@code-asher code-asher changed the title Read URL and token from config on launch Read URL and token from config Mar 2, 2023
@code-asher code-asher force-pushed the asher/background-auth branch from 72cb519 to adbb653 Compare March 2, 2023 19:44
Base automatically changed from asher/background-auth to main March 2, 2023 19:57
@code-asher code-asher force-pushed the asher/existing-token branch 3 times, most recently from 7b84fba to ec0c1ec Compare March 2, 2023 21:20
@code-asher code-asher force-pushed the asher/existing-token branch 2 times, most recently from dc46174 to 890803a Compare March 2, 2023 21:31
@@ -3,6 +3,8 @@ gateway.connector.description=Connects to a Coder Workspace dev environment so t
gateway.connector.action.text=Connect to Coder
gateway.connector.view.login.documentation.action=Learn more about Coder
gateway.connector.view.login.url.label=URL:
gateway.connector.view.login.existing-token.label=Use existing token
gateway.connector.view.login.existing-token.tooltip=Checking "{0}" will prevent the browser from being launched for generating a new token. Additionally, if a token is already configured for this URL via the CLI it will appear as the default and can be used as-is or replaced.
Copy link
Member Author

@code-asher code-asher Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinging @sharkymark @bpmct @ericpaulsen in case anyone has opinions on the wording of the checkbox help text (it has been tweaked a bit since the screenshot).

@code-asher code-asher marked this pull request as ready for review March 2, 2023 21:38
In case the user has already configured the CLI.  This will only happen
without user input until the first successful connection.

After that the "use existing token" checkbox must be used to read the
token from the config.  It will only be used if it matches the URL.

A secondary effect of the checkbox is that it will not open the browser
window so it can also be used in the case where you already have a token
you want to use but it is not in the CLI config.

Lastly I removed some padding in an attempt to regain the space lost by
the additions.
@code-asher code-asher force-pushed the asher/existing-token branch from 890803a to d353e6a Compare March 2, 2023 21:52
@code-asher code-asher merged commit c512e66 into main Mar 3, 2023
@code-asher code-asher deleted the asher/existing-token branch March 3, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use an existing session token when connecting to a Coder deployment
2 participants