disciple-tools-theme icon indicating copy to clipboard operation
disciple-tools-theme copied to clipboard

Introduced New Filter Hook To Support Custom SSO Login Responses

Open kodinkat opened this issue 1 year ago • 9 comments

~~Introduced new dt_sso_login_response filter hook to support custom SSO login responses.~~

Introduced success_url & error_url firebase shortcode url overrides.

kodinkat avatar Oct 02 '24 12:10 kodinkat

@kodinkat can you give an example of how this will be used?

corsacca avatar Oct 03 '24 09:10 corsacca

@kodinkat can you give an example of how this will be used?

Hey @corsacca, see dt_sso_login_response function within corresponding PR; which aims to update redirect_url based on login outcome - @incraigulous may be able to expand on some relevant use cases.

kodinkat avatar Oct 03 '24 10:10 kodinkat

@kodinkat how does this compare with using this filter? $redirect_url = apply_filters( 'dt_login_redirect_url', $redirect_url );

corsacca avatar Oct 03 '24 10:10 corsacca

@kodinkat how does this compare with using this filter? $redirect_url = apply_filters( 'dt_login_redirect_url', $redirect_url );

@corsacca could it potentially be expanded to also accommodate sso payload and error data; to support further business logic?

kodinkat avatar Oct 03 '24 10:10 kodinkat

@kodinkat I think the default workflow would be to pass in or load the SSO login with the desired redirect instead of trying to determine the correct redirect after login. Is there a specific reason for doing it after login instead of before?

corsacca avatar Oct 03 '24 11:10 corsacca

@kodinkat I think the default workflow would be to pass in or load the SSO login with the desired redirect instead of trying to determine the correct redirect after login. Is there a specific reason for doing it after login instead of before?

@incraigulous could the proposed flow work for you? If so, we may need to expand the firebase shortcode, to also accept success/error redirect_url override params.

kodinkat avatar Oct 03 '24 11:10 kodinkat

@kodinkat I think the default workflow would be to pass in or load the SSO login with the desired redirect instead of trying to determine the correct redirect after login. Is there a specific reason for doing it after login instead of before?

@incraigulous could the proposed flow work for you? If so, we may need to expand the firebase shortcode, to also accept success/error redirect_url override params.

I am going to be honest that I feel less informed than both of you here, so I don't feel as if I should be the decision-maker. I will say, one of our original ideas was to pass success/error URLs to the shortcode so I would be in favor of perusing that option.

incraigulous avatar Oct 03 '24 15:10 incraigulous

@kodinkat I think the default workflow would be to pass in or load the SSO login with the desired redirect instead of trying to determine the correct redirect after login. Is there a specific reason for doing it after login instead of before?

@incraigulous could the proposed flow work for you? If so, we may need to expand the firebase shortcode, to also accept success/error redirect_url override params.

I am going to be honest that I feel less informed than both of you here, so I don't feel as if I should be the decision-maker. I will say, one of our original ideas was to pass success/error URLs to the shortcode so I would be in favor of perusing that option.

@corsacca @incraigulous I'll aim to circle back onto this and update firebase shortcode to accommodate new success/error URL parameters.

kodinkat avatar Oct 03 '24 16:10 kodinkat

@corsacca see new success_url & error_url firebase shortcode override params.

kodinkat avatar Oct 09 '24 15:10 kodinkat

Thanks @kodinkat! It looks like this PR is no longer needed. The user fix is also covered here: https://github.com/DiscipleTools/disciple-tools-theme/pull/2598

corsacca avatar Nov 05 '24 11:11 corsacca

👍

On Tue, Nov 5, 2024, 5:08 AM corsacca @.***> wrote:

Thanks @kodinkat https://github.com/kodinkat! It looks like this PR is no longer needed. The user fix is also covered here: #2598 https://github.com/DiscipleTools/disciple-tools-theme/pull/2598

— Reply to this email directly, view it on GitHub https://github.com/DiscipleTools/disciple-tools-theme/pull/2584#issuecomment-2456883441, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNC6GIBRXBGET2LWK7UWR3Z7CRLHAVCNFSM6AAAAABPHRIPSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJWHA4DGNBUGE . You are receiving this because you were mentioned.Message ID: @.***>

incraigulous avatar Nov 05 '24 20:11 incraigulous