zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
199 stars 138 forks source link

Feature: refreshed tokens #297

Closed biertz closed 3 years ago

biertz commented 3 years ago

Hi and first of all, thanks for your great app!

I'm writing a plugin that needs an RPT token for authentication (and possibly authorisation) with another service that uses the same SSO. The idea is to use the Social Login App for authentication at the Nextcloud and then access the other service as that user. For performance reasons, the connection must be s2s, so the tokens cannot be stored in the user's session.

To request the RPT, I needed your app to request, store, and refresh the access token, so I implemented this and would like to push this back upstream. For now, it is configurable only for custom_oidc providers, but it should also work with other providers (must be tested).

Looking forward to your feedback. :)

zorn-v commented 3 years ago

I did not think that your changes should be in master. Why some app should do that need to other app ?

biertz commented 3 years ago

My changes might be useful to other people who need some authenticated interaction between their Nextcloud and their other services, at least that's what I thought.

zorn-v commented 3 years ago

And you forget that this should be supported somehow. I have enough "oauth2 random field names for user id" and hate that day when accept "custom oauth2" :smile:

biertz commented 3 years ago

I don't really understand what you mean… if this is about maintaining the code, I'd naturally do so? But if you don't like it, that's fine with me and I can just close this PR and maintain a local fork.

zorn-v commented 3 years ago

if this is about maintaining the code

Yes. In the end I will must resolve issues like 'My tokens does not refreshed' etc.

But if you don't like it,

Yes too. There is cron jobs etc. It "hidden" by option, but I don't like it. I understand why it needed but it is not my plugin scope.

Don't get me wrong.