fossasia / eventyay-talk

eventyay speakers and talks component
Apache License 2.0
1.48k stars 47 forks source link

Add UI to activate login with eventyay ticket #139

Closed lcduong closed 1 month ago

lcduong commented 1 month ago

This PR closes/references issue #XX. It does so by:

How has this been tested?

Checklist

Summary by Sourcery

This pull request introduces a new feature that allows organizers to enable Single Sign-On (SSO) with Eventyay tickets. It includes the addition of an SSO form in the organizer configuration, enhancements to the OAuth2 adapter and provider to support dynamic provider IDs, and updates to the login URL handling.

lcduong commented 1 month ago

image

There's a SSO client config form in organizer setting, if this key is filled, 'Login with Eventyay-ticker' will be shown in login page.

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request introduces a new SSO feature allowing users to log in with Eventyay tickets. It includes a new form in the organizer configuration, enhancements to the OAuth2 adapter and provider classes, and updates to the login templates to support this functionality.

File-Level Changes

Files Changes
src/pretalx/orga/views/organiser.py
src/pretalx/orga/forms/sso_client_form.py
src/pretalx/orga/templates/orga/organiser/detail.html
src/pretalx/orga/templates/orga/organiser/organiser_sso.html
Introduced new SSO form under organizer configuration, including form handling, validation, and template rendering.
src/pretalx/sso_provider/views.py
src/pretalx/sso_provider/providers.py
Enhanced OAuth2 adapter and provider classes to support dynamic provider IDs and session-based initialization.
src/pretalx/common/templates/common/auth.html Updated login template to support dynamic login URLs based on event organizer.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
mariobehling commented 1 month ago

@sourcery-ai review

lcduong commented 1 month ago

Hi @hongquan, could you help me to review again, some comment can not be fixed because I customize the lib allauth for our service, using same socialapp for app organization

mariobehling commented 1 month ago

As part of this issue on the login screen we also need to change the following text.

You do not need an account to view the event, or submit feedback, or receive schedule updates. You’ll only need an account if you participate in the event as speaker or as an organiser.

Change to: If you already created a proposal for a different event on this server, you can re-use your account to log in for this event. You do not need an account to view the event, submit feedback, or receive schedule updates. An account is only necessary if you want to create your own personalized schedule, or if you are participating in the event as a speaker or organizer.

Screenshot from 2024-07-28 23-10-52

odkhang commented 1 month ago

As part of this issue on the login screen we also need to change the following text.

You do not need an account to view the event, or submit feedback, or receive schedule updates. You’ll only need an account if you participate in the event as speaker or as an organiser.

Change to: If you already created a proposal for a different event on this server, you can re-use your account to log in for this event. You do not need an account to view the event, submit feedback, or receive schedule updates. An account is only necessary if you want to create your own personalized schedule, or if you are participating in the event as a speaker or organizer.

Screenshot from 2024-07-28 23-10-52

Hi @mariobehling, message is changed

image