Yōten: A social tracker for your language learning journey built on the atproto.

feat: use redis to store oauth sessions and switch to new indigo oauth library #3

merged opened by brookjeynes.dev targeting master from bj/2025-10-08/feat/indigo-oauth
Labels

None yet.

Participants 1
AT URI
at://did:plc:4mj54vc4ha3lh32ksxwunnbh/sh.tangled.repo.pull/3m2ocu6lsfb22
+19 -9
Interdiff #1 β†’ #2
go.mod

This file has not been changed.

go.sum

This file has not been changed.

internal/server/app.go

This file has not been changed.

internal/server/config/config.go

This file has not been changed.

internal/server/middleware/middleware.go

This file has not been changed.

internal/server/views/login.templ

This file has not been changed.

internal/server/views/views.go

This file has not been changed.

internal/atproto/xrpc.go

This file has not been changed.

internal/cache/cache.go

This file has not been changed.

internal/cache/session/store.go

This file has not been changed.

internal/db/db.go

This file has not been changed.

internal/server/handlers/activity.go

This file has not been changed.

internal/server/handlers/comment.go

This file has not been changed.

internal/server/handlers/follow.go

This file has not been changed.

+19 -9
internal/server/handlers/login.go
··· 58 return 59 } 60 61 - // if !h.Config.Core.Dev { 62 - // err := o.posthog.Enqueue(posthog.Capture{ 63 - // DistinctId: resolved.DID.String(), 64 - // Event: ph.UserSignInInitiatedEvent, 65 - // }) 66 - // if err != nil { 67 - // log.Println("failed to enqueue posthog event:", err) 68 - // } 69 - // } 70 71 redirectURL, err := h.Oauth.ClientApp.StartAuthFlow(r.Context(), handle) 72 if err != nil { 73 http.Error(w, err.Error(), http.StatusInternalServerError) 74 return 75 } 76 77 htmx.HxRedirect(w, redirectURL)
··· 58 return 59 } 60 61 + if !h.Config.Core.Dev { 62 + err := h.Posthog.Enqueue(posthog.Capture{ 63 + DistinctId: handle, 64 + Event: ph.UserSignInInitiatedEvent, 65 + }) 66 + if err != nil { 67 + log.Println("failed to enqueue posthog event:", err) 68 + } 69 + } 70 71 redirectURL, err := h.Oauth.ClientApp.StartAuthFlow(r.Context(), handle) 72 if err != nil { 73 http.Error(w, err.Error(), http.StatusInternalServerError) 74 return 75 + } 76 + 77 + if !h.Config.Core.Dev { 78 + err := h.Posthog.Enqueue(posthog.Capture{ 79 + DistinctId: handle, 80 + Event: ph.UserSignInSuccessEvent, 81 + }) 82 + if err != nil { 83 + log.Println("failed to enqueue posthog event:", err) 84 + } 85 } 86 87 htmx.HxRedirect(w, redirectURL)
internal/server/handlers/pending-ops.go

This file has not been changed.

internal/server/handlers/profile.go

This file has not been changed.

internal/server/handlers/reaction.go

This file has not been changed.

internal/server/handlers/resource.go

This file has not been changed.

internal/server/handlers/router.go

This file has not been changed.

internal/server/handlers/study-session.go

This file has not been changed.

internal/server/oauth/consts.go

This file has not been changed.

internal/server/oauth/handler.go

This file has not been changed.

internal/server/oauth/handler/handler.go

This file has not been changed.

internal/server/oauth/oauth.go

This file has not been changed.

internal/server/oauth/store.go

This file has not been changed.

internal/server/views/partials/header.templ

This file has not been changed.

internal/types/types.go

This file has not been changed.

History

4 rounds 0 comments
sign up or login to add to the discussion
3 commits
expand
feat: add redis
feat: redirect user back to where they were after login redirect
feat: use redis to store oauth sessions and switch to new indigo oauth library
expand 0 comments
pull request successfully merged
3 commits
expand
feat: add redis
feat: redirect user back to where they were after login redirect
feat: use redis to store oauth sessions and switch to new indigo oauth library
expand 0 comments
3 commits
expand
feat: add redis
feat: redirect user back to where they were after login redirect
feat: use redis to store oauth sessions and switch to new indigo oauth library
expand 0 comments
3 commits
expand
feat: add redis
feat: redirect user back to where they were after login redirect
feat: use redis to store oauth sessions and switch to new indigo oauth library
expand 0 comments