FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Session variables lost on auth-callback when deployed to production

    Scheduled Pinned Locked Moved
    General Discussion
    0
    2
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      craig
      last edited by

      I've been using this solution to test the fusion auth apis for multi tenancy.

      The example works well for a single application but when we try to replace the config values with injected variables into the session from the login service, when we intercept the request in oauth-callback the session variables are not available when deployed to a production server under Https.

      If i run this locally using http://localhost:4200 for the angular app and http://localhost:3000 for the server, the session variables persist from login to oauth-callback.

      I read some articles about adding withCredentials = true which i have done but that doesn't seem to solve the problem.

      Has anyone else had this issue and if so how did you resolve it?

      Or alternatively, does anyone have a github repo that implements multi tenancy using Fusion Auth?

      https://github.com/FusionAuth/fusionauth-angular-example

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        I'm not sure what is going on, but my guess is that the cookies are shared locally (cookies are shared across ports), which is why things are working.

        If you are trying to pass information from when someone logs in to after they are logged in, through the oauth flow, you should look at the state parameter. There's some information on doing that here: https://fusionauth.io/community/forum/topic/165/taking-a-user-directly-to-the-registration-page?_=1610507951768 but I'm not sure how it integrates with whatever library you are using. I'd consult the docs for that lib.

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • First post
          Last post