templates: add next param for github oauth sso#2957
templates: add next param for github oauth sso#2957partizipation wants to merge 3 commits intomainfrom
Conversation
| class="socialaccount-provider {{ provider.id }} {{ brand.id }}" | ||
| href=" | ||
| {% if provider.id == 'github' %} | ||
| {% provider_login_url provider.id openid=brand.openid_url process=process next='/accounts/3rdparty/signup/' %} |
There was a problem hiding this comment.
Why does github need this but no other provider?
There was a problem hiding this comment.
Ah sorry, I read the PR description now.
I think it would be cool to test it without the conditional, and see if the next parameter works with everything
There was a problem hiding this comment.
@shn-liqd I'm not sure but I think the next url might interfere with what facebook expects for this
There was a problem hiding this comment.
We used to test with the dummy provider.
In your local.py we can extend the INSTALLED_APPS with a dummy SSO provider
ref: https://github.com/pennersr/django-allauth/blob/b74b04a8261486db8a3823c26c188820aed599aa/examples/react-spa/backend/backend/settings.py#L32
Then also add in the local.py:
SOCIALACCOUNT_PROVIDERS = {
'dummy': {
'APP': {
'client_id': 'dummy',
'secret': 'dummy',
}
}
}
run the migrate command, and I can't remember from the top of my head if a dummy button appears, if not then, go visit the url accounts/dummy/login
STS-232
Adds to #2951 #2953 #2954 #2955
Github uses oath, which seems like needs to have redirect explicitly defined as query param when routed to. This conditionally gives that param for github only, as not sure if it would interfere with other providers, which currently work in testing.