Monorepo for Tangled
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

appview/state: start auth flow when switching accounts

If session has expired, start auth flow.

Signed-off-by: Seongmin Lee <git@boltless.me>

authored by

Seongmin Lee and committed by
Tangled
af22bfde 19e03757

+7 -1
+7 -1
appview/state/accounts.go
··· 23 23 24 24 if err := s.oauth.SwitchAccount(w, r, did); err != nil { 25 25 l.Error("failed to switch account", "err", err) 26 - s.pages.HxRedirect(w, "/login?error=session") 26 + redirectURL, err := s.oauth.ClientApp.StartAuthFlow(r.Context(), did) 27 + if err != nil { 28 + l.Error("failed to resume login flow", "err", err) 29 + s.pages.HxRedirect(w, "/login?error=session") 30 + return 31 + } 32 + s.pages.HxRedirect(w, redirectURL) 27 33 return 28 34 } 29 35