auth0 / nextjs-auth0

Next.js SDK for signing in with Auth0
MIT License
2.03k stars 384 forks source link

SDK doesn't seem to support SAML connection #989

Closed Will956 closed 1 year ago

Will956 commented 1 year ago

Checklist

Description

Hello šŸ‘‹

I tried to set up an Enterprise SAML connection using that SDK but it doesn't seem to support it. Here is the flow:

sequenceDiagram
    My app->>Auth0 Universal Login: User clicks on connect
    Auth0 Universal Login->>SAML Provider: User click on "Connect with SAML provider"
    SAML Provider->>Auth0 Universal Login: Connection successful, return info
    Auth0 Universal Login->>My app: Redirect to /, but nothing happen, user is not connected

If I use an Enterprise OIDC connection, it works as expected.

I understand that SDK doesn't support IdP-Initiated flow (https://github.com/auth0/nextjs-auth0/issues/261) but this is not the case in my example if I understand correctly?

There is no error when I'm redirected to my app after login with SAML (I'm just not connected), and I use Auth0 as my SAML provider (in another tenant) to test.

Do you see any reasons why it's not working, or is it a misconfiguration on my side since it should work as expected ?

Thanks a lot ā¤ļø

Reproduction

Can upload a video if necessary but not sure if that helps.

SDK version

2.0.1

Next.js version

13.1.1

Node.js version

16.13.2

Will956 commented 1 year ago

Ok my bad, I had http://localhost:3000 as the application callback URL from the SAML provider instead of https://MY_TENANT.eu.auth0.com/login/callback?connection=MY-CONNECTION šŸ¤“ This works as expected, sorry I'm closing this!