Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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