Authentication using JWKUrl

Had a chat with Minhaj about this and we found that

max-age for firebase keeps on changing on making requests and user would have to set a low value for the refresh for this to work. This is because say the key was expiring in 6h and the user set the refresh interval to be 1h, then there could be an interval of 1h where we are still working with the old keys and auth requests would fail. So all in all unless we refresh keys when they expire from firebase, we’ll have a time window where auth doesn’t work for the user as expected. Ofcourse the user can get around this by setting a very low value like 1s for the refresh_interval but it seems like we should have some special handling for Firebase to make the experience smooth for the user.

So I saw me keep a refresh_interval setting but do something special for Firebase to make things work well with it.

1 Like