elm-jwt icon indicating copy to clipboard operation
elm-jwt copied to clipboard

please provide a documented, generic alias to `firebase`

Open robx opened this issue 6 years ago • 1 comments
trafficstars

I'd like to reuse the firebase decoder for a generic JWT-authenticated backend (postgrest specifically), which uses the standard exp, iat, user_id fields. However, this feels wrong with the existing API, because:

  • it's not firebase
  • the API docs don't state what the JWT is actually expected to look like

I'd suggest defining generic = firebase and documenting the behaviour of generic. What do you think?

robx avatar Sep 16 '19 08:09 robx

I have not yet found a definition of a generic JWT. Indeed the whole point is that you can add what you like, to facilitate the backend at the time that the user sends something to it. iat is clearly a standard field, and there are perhaps others. But beyond that I offered a couple that I developed in specific cases

simonh1000 avatar Sep 16 '19 09:09 simonh1000