con2 / con2/larpit-fi

On logout, make it clear to the user they were not logged out of Kompassi; present a button to do so

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

This change was made in kompassi v2 recently, but that is considered part of Kompassi so it is logical that logging out of one also logs you out of the other.

Larpit.fi is more clearly a separate service, so it would make sense to give the user this option but not necessarily force them to do it.

From profile menu logout, after next-auth logout, redirect user to `/logout?loggedOut=1`.

Create a new page, `/logout`:

* If not logged in and `?loggedOut=1`, tell the user they may still be logged in to Kompassi, and provide a button link to `${kompassiBaseUrl}/logout` (GET suffices).
* If not logged in and no `?loggedOut=1`, tell the user so and let them log in by a button.
* If logged in, tell they are logged in and present buttons to
* log out only of Larpit.fi (redirect to `/logout?loggedOut=1` after next-auth logout)
* log out of both Larpit.fi and Kompassi (redirect to `${kompassiBaseUrl}/logout` after next-auth logout).

Note that next-auth won't honor a `callbackUrl` that is not in the same domain. The redirect after logout needs a manual JS redirect.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the profile-menu logout flow and the existing next-auth logout handling, then find the route structure for adding the `/logout` page. Done means the page shows the correct state, offers the specified Larpit.fi and Kompassi logout buttons, redirects to `/logout?loggedOut=1` where required, and uses a manual JavaScript redirect for the cross-domain Kompassi URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.