-
Notifications
You must be signed in to change notification settings - Fork 8
Technical Question: should we use a JWT for AUTH_API_KEY? #268
Copy link
Copy link
Closed
Labels
T25mTime Estimate 25 MinutesTime Estimate 25 MinutesdiscussShare your constructive thoughts on how to make progress with this issueShare your constructive thoughts on how to make progress with this issuedocumentationImprovements or additions to documentationImprovements or additions to documentationhelp wantedIf you can help make progress with this issue, please comment!If you can help make progress with this issue, please comment!priority-1Highest priority issue. This is costing us money every minute that passes.Highest priority issue. This is costing us money every minute that passes.questionA question needs to be answered before progress can be made on this issueA question needs to be answered before progress can be made on this issueresearchResearch required; be specificResearch required; be specifictechnicalA technical issue that requires understanding of the code, infrastructure or dependenciesA technical issue that requires understanding of the code, infrastructure or dependencies
Metadata
Metadata
Assignees
Labels
T25mTime Estimate 25 MinutesTime Estimate 25 MinutesdiscussShare your constructive thoughts on how to make progress with this issueShare your constructive thoughts on how to make progress with this issuedocumentationImprovements or additions to documentationImprovements or additions to documentationhelp wantedIf you can help make progress with this issue, please comment!If you can help make progress with this issue, please comment!priority-1Highest priority issue. This is costing us money every minute that passes.Highest priority issue. This is costing us money every minute that passes.questionA question needs to be answered before progress can be made on this issueA question needs to be answered before progress can be made on this issueresearchResearch required; be specificResearch required; be specifictechnicalA technical issue that requires understanding of the code, infrastructure or dependenciesA technical issue that requires understanding of the code, infrastructure or dependencies
Type
Projects
Status
✅ Done
At present an
AUTH_API_KEYhas the format:The reason I wet with this and still like it is because it's human-readable
and immediately obvious which environment (
auth instance) it's for; in this case:authdemo.fly.devSo if I see this key in my
.envfile or environment variable, I know exactly what it's for. 👌I think this has a pretty major advantage in terms of Developer Experience ... 💭
But equally it has a disadvantage: no embedded info like
expiry.We outlined the benefits of
JWTsin our mega-popular doc: https://github.com/dwyl/learn-json-web-tokensAnd we are using them in
authfor session tokens:auth/lib/auth_web/controllers/auth_controller.ex
Line 200 in 83c286a
So my question is: should the next version of
auth(andauth_plug) use aJWTas theAUTH_API_KEY?Will having a
JWTfor theAUTH_API_KEYand a differentJWTfor session token be confusing to devs? 🤷♂️Are we missing something?
Please let me know your thoughts ... 💭 🙏