Is there any benefit to using refresh tokens if the session token is an opaque token stored in a database?

I’m working on a personal project that is an app that deals with user mental health data. Because of the sensitivity of the data, and the fact that the app syncs with the cloud as apposed to loading data directly from the cloud, I decided … Continue reading Is there any benefit to using refresh tokens if the session token is an opaque token stored in a database?

How do you prevent hackers from taking a "publicly used API key" and using it in their own script?

At first, for MVP, I want to basically allow API requests to only come from my domains, or from a server-side script I control.
For the server-side script, I can simply use a "secret API token" sent in the Authorization Bearer he… Continue reading How do you prevent hackers from taking a "publicly used API key" and using it in their own script?

How should the grant type of an oauth2 access token be preserved after refreshing it using refresh grant?

Let’s say I got an access token of the "authorization code" grant type. After the expiration of it, I would refresh it using the refresh grant. Then I’ll get a new token. Is the grant type of the new token still the same as the &… Continue reading How should the grant type of an oauth2 access token be preserved after refreshing it using refresh grant?