-
Notifications
You must be signed in to change notification settings - Fork 9
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
Include auth_url in AUTH_API_KEY ? #162
Comments
Basically we can avoid hard-coding the Line 36 in 165571d
Because the URL would be in the |
Adding the redirect url in the environment variable should work. I don't find it to bothering to define the url in the plug config, I was using it to test redirection to other auth applications while developing/testing but I don't mind to switch to a full environment variable configuration. |
OK. let's roll this Developer Experience improvement into the "V2" update. 💭 |
To give you an idea: the project I've been working on these last few months has 27 environment variables. As for the environment variables required to get the That way when people run the |
I'm adding the auth_url on the app show page: <%= #{apikey.client_id}/#{apikey.client_secret}/#{auth_url} %> However using the "/" character to seperate the different parts of the key might not work nicely with the url (ie https://...). I'm thinking of using "-" instead
|
@SimonLab yeah, was considering using the |
sounds good, I don't mind to change "-" to "|". Or we could create an environment variable to configure this character in the app 😉 There is however an issue in the .env file when we source them: |
@SimonLab i wasn’t going to use a fully qualified url (with the https:// ) as the protocol is just clutter. We will always connect over HTTPS so it will be omitted from the environment variable. |
"https://" removed with 01b19c2 |
Thanks Simon! 🎉 |
The auth_url has been added to the api key with #163 |
While going through the steps of setting up a "dev" version of this app on Heroku so that we can have Review Apps #161,
it occurred to me that Google includes a URL in their
GOOGLE_CLIENT_ID
... 🤯auth/.env_sample
Line 6 in 165571d
e.g:
Note: Just an example for illustration. Not a real/valid key. 🔑
We could make the setup of
auth_plug
even easier because theAUTH_API_KEY
could contain theauth_url
and thus the single environment variable becomes all that is needed for configuration!
This would require a fair amount of refactoring (2-3h with tests), but I think it's probably worth it! 💭
@SimonLab Thoughts? 💭
The text was updated successfully, but these errors were encountered: