I'm fairly new to setting up an Oath2 server, and was hoping that someone could help me shed some light on a couple things.
This is the package that I am implementing:
https://github.com/lucadegasperi/oauth2-server-laravel
From what I've read about this package, Im pretty sure that the 'password' / 'Resource Ownner' grant_type is what I should be using for setting up a mobile app's API access much like a mobile banking app (sensitive data)
Referencing the OAuth2 spec:
http://tools.ietf.org/html/rfc6749#section-4.3
The OAth2 spec states that the client must already be authenticated, so there are 5 total parameters that must be passed to be granted an access token:
- grant_type ('password')
- username
- password
- client_id
- client_secret
I have 2 questions regarding this:
- Are Android and IOS apps capable of keeping a 'client_id' and 'client_secret' confidential? ('client' being the app or device itself, not the user)
- Should 'client_id' and 'client_secret' be unique per device? (should i create a new controller for generating client_ids and client_secrets per device in a separate request, or use the same client_id and client_secret to be built into the apps.)
Ultimately, I'm trying to figure out best practices for getting records in the 'oath_clients' table and if those entries should be unique per device.
Thanks for you help!