File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,10 +109,6 @@ export const AuthorizePage = () => {
109109 } ,
110110 } ) ;
111111
112- if ( ! isLoggedIn ) {
113- return < Navigate to = { `/login?${ compiledOIDCParams } ` } replace /> ;
114- }
115-
116112 if ( missingParams . length > 0 ) {
117113 return (
118114 < Navigate
@@ -122,6 +118,10 @@ export const AuthorizePage = () => {
122118 ) ;
123119 }
124120
121+ if ( ! isLoggedIn ) {
122+ return < Navigate to = { `/login?${ compiledOIDCParams } ` } replace /> ;
123+ }
124+
125125 if ( getClientInfo . isLoading ) {
126126 return (
127127 < Card className = "min-w-xs sm:min-w-sm" >
Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ export const LoginPage = () => {
9090 mutationKey : [ "login" ] ,
9191 onSuccess : ( data ) => {
9292 if ( data . data . totpPending ) {
93- window . location . replace ( `/totp?${ compiledOIDCParams } ` ) ;
93+ window . location . replace (
94+ `/totp?redirect_uri=${ encodeURIComponent ( props . redirect_uri ) } ` ,
95+ ) ;
9496 return ;
9597 }
9698
Original file line number Diff line number Diff line change @@ -233,14 +233,14 @@ func (controller *OIDCController) Token(c *gin.Context) {
233233 entry , err := controller .oidc .GetCodeEntry (c , controller .oidc .Hash (req .Code ))
234234 if err != nil {
235235 if errors .Is (err , service .ErrCodeNotFound ) {
236- tlog .App .Warn ().Str ( "code" , req . Code ). Msg ("Code not found" )
236+ tlog .App .Warn ().Msg ("Code not found" )
237237 c .JSON (400 , gin.H {
238238 "error" : "invalid_grant" ,
239239 })
240240 return
241241 }
242242 if errors .Is (err , service .ErrCodeExpired ) {
243- tlog .App .Warn ().Str ( "code" , req . Code ). Msg ("Code expired" )
243+ tlog .App .Warn ().Msg ("Code expired" )
244244 c .JSON (400 , gin.H {
245245 "error" : "invalid_grant" ,
246246 })
You can’t perform that action at this time.
0 commit comments