Skip to content

Updating Go SSO Example - #37

Merged
jmacelroy merged 3 commits into
mainfrom
jdm/go-sso-updates
May 21, 2026
Merged

jmacelroy merged 3 commits into
mainfrom
jdm/go-sso-updates

Conversation

@jmacelroy

Copy link
Copy Markdown
Contributor
  • Adding Github as a login option
  • Fixed a panic with large profiles by only string first and last name in the cookie but printing out the entire raw profile in the callback
  • Added fresh links to the README where there were stale 404s
  • Addressed some style/idiom nits in the Go
  • Made the WorkOS logo blend in with the background of the html

jmacelroy added 3 commits May 20, 2026 16:50
- Add a GitHub OAuth login button so the example covers the
  third common social provider alongside Google and Microsoft,
  and drop the card's fixed height so all four buttons fit.

- Replace CookieStore with FilesystemStore (1MB MaxLength) so
  the raw profile JSON written into the session on callback no
  longer trips "securecookie: the value is too long" and panics
  the handler.

- Redact the API key in the startup log so logs can be shared
  during local debugging.

- Rename Profile fields to Go-idiomatic names (FirstName,
  LastName, RawProfile) and update the logged_in.html template
  reference to match.

- Apply mix-blend-mode: multiply to the nav logo so its white
  PNG background blends into the page background.
 the full profile JSON in the session. The profile is only useful on
 the immediate /callback response, so persisting it across requests
 is unnecessary. Instead:

   - Switch back to CookieStore. Session now carries only
     authenticated/first_name/last_name, well under the 4KB cookie limit.

   - Render the full profile JSON on /callback directly from the fresh
     GetProfileAndToken response.

   - /logged_in revisits render the name only; logged_in.html conditionally
     shows the profile block when RawProfile is set.
@jmacelroy
jmacelroy merged commit 852cfa8 into main May 21, 2026
4 checks passed
@jmacelroy
jmacelroy deleted the jdm/go-sso-updates branch May 21, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants