Skip to content

Instantly share code, notes, and snippets.

@liamg
Last active August 4, 2022 08:38
Show Gist options
  • Save liamg/f710ec25f7da512f08333e6f1d8acbbc to your computer and use it in GitHub Desktop.
Save liamg/f710ec25f7da512f08333e6f1d8acbbc to your computer and use it in GitHub Desktop.
Sema Debugging

First, I click "Sign in with GitHub":

image

At this point the page hangs for about 12 seconds.

image

This delay is caused by the auth callback from GitHub (https://api.semasoftware.com/v1/identities/github/cb?code=...), but it does successfully complete after this time and redirect to /dashboard, giving the impression the authentication was successful:

image

The problem appears to be with the subsequent call to /dashboard, which immediately redirects back to /login and overwrites the auth cookie _sema with deleted, effectively logging me back out:

image

The JWT token created by the auth callback also appears valid (though obviously I can't check the signature) - here's the payload component:

{
  "_id": "62e940d542908d001e135757",
  "firstName": "Liam",
  "isVerified": false,
  "isWaitlist": false,
  "exp": 1667377521,
  "iat": 1659601521
}

...though I wonder if the isVerified being false is an issue?

Shout if I can provide any other info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment