oAuth2 - Grant types and access tokens
Hi,
I've built a RESTful API for my business and i've implemented an OAuth 2.0 Server (https://github.com/lucadegasperi/oauth2-server-laravel) and it's all working as expected.
I'm new to oAuth2 and I've done quite a bit of reading on this, but i'm still a little bit confused about the various grant types. I've chosen the 'Client Credentials' grant type, because the only clients that need access to the API are my own websites / CMS etc. The concept of users in this situation seems alien to the usage of the API, so I wanted to check to see if people think that this would be the most suitable grant type to use in these circumstances?
Secondly, I'm also unsure about how to handle the access tokens when consuming the API from the websites or CMS. Would it be best practice to ask for a new access token for every request , meaning that there would need to be two request for each request to the API, or, perhaps, save the access token in the Cache for the period of time(expires_in) sent back with the initial access token request.
Thanks, Rob
Please or to participate in this conversation.