Skip to content
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

getting the ACCESS_TOKEN from env #726

Merged
merged 5 commits into from
Oct 28, 2021
Merged

Conversation

felix-ht
Copy link
Collaborator

Split out from #723

Having users hardcode their token is a bad idea:

  1. it is easy to miss while setting it up
  2. it is easy to miss while doing a pull request

The new solution uses String.fromEnvironment. If the token is not set an error screen is shown.

To set the token the user passes it with flutter run --dart-define=ACCESS_TOKEN=YOUR_TOKEN. It's also easy to set this variable in IDE's as well.

Copy link
Collaborator

@shroff shroff left a comment

Choose a reason for hiding this comment

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

Great idea @felix-ht. Feel free to add a comment as suggested by @m0nac0 before pushing, though I do think it's fine without it since you show the message in the example app.

@felix-ht felix-ht force-pushed the example-get-access-token-from-env branch from 2d3b7fd to d49bd5f Compare October 28, 2021 16:12
@felix-ht felix-ht had a problem deploying to ANDROID_CI_DOWNLOADS_TOKEN October 28, 2021 16:12 Failure
@felix-ht felix-ht had a problem deploying to ANDROID_CI_DOWNLOADS_TOKEN October 28, 2021 16:12 Failure
@felix-ht felix-ht merged commit 75ae02b into master Oct 28, 2021
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.

3 participants