-
Notifications
You must be signed in to change notification settings - Fork 26
templates: add next param for github oauth sso #2957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does github need this but no other provider?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.