-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Logout doesn't work #3
Comments
That link should be visited as a regular link, not using AJAX. This is because you use |
But something else seems to be wrong, as I was logged in as @zampino when I opened that page the first time oO |
Removing hx-boost fixed the CORS error, but didn't log me out. |
That is seriously strange :) |
A lot of things are happening when I click logout, but logging out is not one of them: Screen.Recording.2024-06-25.at.15.10.36.mov |
In addition to the "wrong user" horror, I was unable to login with Apple creds at all |
(Thanks for reporting, @licht1stein! This stuff is very early 😆) |
@jackrusher I'm very glad to help! |
Your app redirects to the login when there's not user in the session... |
Sure, cause you need to be logged in to use it. |
This is the middleware that does it: (defn login-checker
[handler]
(fn [{:keys [app/db] :as request}]
(if-let [user (garden-id/get-user request)]
(handler (assoc request :app/user (users/ensure-user db {:user/email (:email user)
:user/name (:name user)})))
(redirect garden-id/#-uri)))) |
But there is no login dialog if you are already logged in at application.garden, so it transparently logs you in again... |
Well, not the impersonate part. The enter your credentials part. So the user is logged out of my site, but not logged out of the OIDC, and that's why they get back in. But if user pressed logout, they probably should be prompted to confirm logging back in? |
You need to visit |
So this should be the logout link instead of |
This will log out the user of every garden app, so imo no. |
I mean, I can go around this limitation by adding a In addition to non-intuitive part, every garden user goes around transmitting their personal data to every garden.app, even if they never wanted to use it. This doesn't feel right. |
My expectation of a website is that the moment I press "Logout" I'm using it as an anonymous user. This isn't the case with garden-id, right? For this app it's no problem — I wanted to make a public home page anyway, and I can redirect to the public homepage later. But I wouldn't be comfortable with putting this into a client's app. |
If you press logout, there's no session anymore to identify you, so it's an anonymous user. The thing is that you are logged in automatically if you redirect to the login endpoint. We should probably make an interstitial there to at least ask if the user logs in to an app they have not used before. (C.f. how github does it.) |
@leahneukirchen let's add that interstitial |
Would it make things easier/different if we'd store the name of the app (from the container's env var) on the session after the successful OIDC callback, and make the garden-id/src/nextjournal/garden_id.clj Line 263 in 06b67b5
|
Hi,
Everything works in development, but when deployed logout doesn't seem to do anything, and neither does deleting all the cookies. Here's the app initialization:
And here's the deployed app: https://sidework.apps.garden
Please advise what am I doing wrong?
The text was updated successfully, but these errors were encountered: