Skip to content

Conversation

@partizipation
Copy link
Contributor

@partizipation partizipation commented Jun 12, 2025

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.

@partizipation partizipation changed the title templates: add next param for github oauth sso wip: templates: add next param for github oauth sso Jun 12, 2025
@partizipation partizipation changed the title wip: templates: add next param for github oauth sso templates: add next param for github oauth sso Jun 12, 2025
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/' %}
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants