Add possibility to get additional user data (additional scope)#163
Conversation
|
could you pls address linter warnings? |
|
@umputun done. BTW regarding BearerTokenHook type. I want to clarify for myself, do we look on it like on real hook, I mean we doesn't worry what happens inside, just notify and forget or we treat it like a part of auth workflow? For me, this type a little bit wrong in both cases. In case of "part of workflow", we should respect the errors from that callback. So the type should looks like WDYT? |
|
For some reason, GH never sent me an update about this change and also has not run actions on it. I just discovered it, and have found a minor comment lint issue and fixed it. Going to merge. Regarding BearerTokenHook - i believe this supposed to be a "part of workflow" but we better should check with the original author (@nbys) of the custom oauth2 server I'm going to merge it, but feel free to open a discussion about |
Hi,
I added the possibility to get additional customer information (instead of just username, avatar and id).
Use case:
I use this library in my project and want to simplify user authorization as much as possible. My application is require to have at least email to proceed of using full functionality of application, and I don't see any reason to limit it if customer already provide it in one of the providers and authorize to use this data in application.
Backward compatibility
The solution is backward compatible. I saw that library still not released and we can legally broke contracts, but to avoid additional work for customers I didn't change API, just add new public method to use.
All additional fields will go under attributes section. Example: