Monorepo for Tangled tangled.org
854
fork

Configure Feed

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

appview/state: start auth flow when switching accounts #320

open opened by boltless.me targeting master from sl/wtrwqntnmtks

If session has expired, start auth flow.

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

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mkzjas6iav22
+7 -1
Diff #0
+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

History

1 round 0 comments
sign up or login to add to the discussion
boltless.me submitted #0
1 commit
expand
appview/state: start auth flow when switching accounts
merge conflicts detected
expand
  • appview/state/accounts.go:23
expand 0 comments