AB
AB
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
Thankyou
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
No description
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
No description
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
I was able to fix it by appending SameSite attrib
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
SameSite cookie attribute was missing from oidc responses
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
@bekacru I think the cookie issue on redirect is from better-call v1. Till v 0.3.3 and 1.1.9 it was working fine.
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
On Nextjs route I also see oidc_cookie in "Set-Cookie" response header. But it is not there on cookie storage. const res = await auth.handler(req); const cookieValue = res.headers.get("Set-Cookie"); console.log("res.cookie", cookieValue);
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
And I see that when there is throw ctx.redirect or return ctx.redirect the cookie is not getting set. But when i do ctx.json() response the cookie is being correctly set.
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
I mocked the authorize endpoint. endpoints: { authorize: createAuthEndpoint( "/oauth2/authorize", { method: "GET", }, async (ctx) => { await ctx.setSignedCookie( "oidc_login_prompt", JSON.stringify(ctx.query), ctx.context.secret, { maxAge: 10000, }, ); const queryFromURL = ctx.request?.url?.split("?")[1]; const cookie = await ctx.getSignedCookie( "oidc_login_prompt", ctx.context.secret, ); // console.log("oidc_login_prompt", cookie); throw ctx.redirect(/login?${queryFromURL}); }, ), },
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
yes. I do the same.Its just that automatic redirection failed because of no cookie. Its been there since 1.2.0
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
Can you give example? How can i use oidc client.
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
I have currently same setup. but because of cookie issue. Redirect is not happening. It works fine when user is already logged into central auth server
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
@bekacru I just tested oidc cookie issue. Its been there since 1.2.0. I am able to get oidc_login_prompt and oidc_consent cookie on version 1.1.9
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
But i dont see oidc cookiee being set when logging in. Previously it used to iguess
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
It is cross domain also. And ithink OIDC makes sense for cross domain, as there is no way to share cookie.
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
Any thing you would like to suggest. What kind of setup should i go for. 1. I want all users in same db table. 2. They can access different products on different domains. Thankyou
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
Same with the sso plugin
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
Now it shows 200 only
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
But when log in is succesful no redirect happens. Previously It used to even though it was buggy. but 302 were there.
39 replies
BABetter Auth
Created by AB on 3/28/2025 in #help
Single Auth Multiple apps setup.
And it sucesfully generates the central auth uri. I see the form and all the oauth stuff in header.
39 replies