@@ -31,8 +31,6 @@ type IDPRouter struct {
3131 authRouter * auth.AuthRouter
3232}
3333
34- const Issuer = "mcp-oauth-proxy"
35-
3634func NewIDPRouter (
3735 repo repository.Repository ,
3836 privKey * rsa.PrivateKey ,
@@ -51,7 +49,7 @@ func NewIDPRouter(
5149 AccessTokenLifespan : 24 * time .Hour ,
5250 RefreshTokenLifespan : 30 * 24 * time .Hour ,
5351 RefreshTokenScopes : []string {},
54- AccessTokenIssuer : Issuer ,
52+ AccessTokenIssuer : externalURL ,
5553 EnforcePKCE : false ,
5654 EnforcePKCEForPublicClients : false ,
5755 EnablePKCEPlainChallengeMethod : true ,
@@ -144,7 +142,7 @@ func (a *IDPRouter) handleAuthorizationReturn(c *gin.Context) {
144142 for _ , scope := range ar .GetRequestedScopes () {
145143 ar .GrantScope (scope )
146144 }
147- jwtSession , err := NewJWTSessionWithKey (Issuer , "user" , a .privKey )
145+ jwtSession , err := NewJWTSessionWithKey (a . externalURL , "user" , a .privKey )
148146 if err != nil {
149147 a .logger .With (utils .Err (err )... ).Error ("Failed to create JWT session" , zap .Error (err ))
150148 a .provider .WriteAuthorizeError (ctx , c .Writer , ar , err )
@@ -337,7 +335,7 @@ func (a *IDPRouter) handleOauthAuthorizationServer(c *gin.Context) {
337335 }
338336
339337 res := & authorizationServerResponse {
340- Issuer : Issuer ,
338+ Issuer : a . externalURL ,
341339 AuthorizationEndpoint : authorizationEndpoint ,
342340 TokenEndpoint : tokenEndpoint ,
343341 RegistrationEndpoint : registrationEndpoint ,
0 commit comments