Skip to content

Commit

Permalink
fix: gob unregistered type url
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-elliott committed Aug 26, 2023
1 parent 0fbe468 commit a7fb414
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"net/http"
"net/url"

"github.com/coreos/go-oidc/v3/oidc"
"github.com/gorilla/mux"
Expand Down Expand Up @@ -136,8 +135,8 @@ func protectedHandler(basic bool) http.HandlerFunc {
}

if val, ok := session.Values["ac_url"]; ok {
if acurl, ok := val.(*url.URL); ok {
tpl.AuthorizeCodeURL = acurl.String()
if acurl, ok := val.(string); ok {
tpl.AuthorizeCodeURL = acurl
}
}

Expand Down Expand Up @@ -234,7 +233,7 @@ func oauthCallbackHandler(res http.ResponseWriter, req *http.Request) {

session.Values["claims"] = claims
session.Values["logged"] = true
session.Values["ac_url"] = req.URL
session.Values["ac_url"] = req.URL.String()
rawTokens[claims.JWTIdentifier] = idTokenRaw

if err = session.Save(req, res); err != nil {
Expand Down

0 comments on commit a7fb414

Please sign in to comment.