File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ func addCorsMiddleware(s fiber.Router) {
139139 allowedPaths := []string {
140140 routes .WellknownMytokenConfiguration ,
141141 routes .WellknownOpenIDConfiguration ,
142+ routes .GetGeneralPaths ().JWKSEndpoint ,
142143 }
143144 allowedPrefixes := []string {
144145 apiPath .Prefix ,
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ function discovery(...next) {
1717 }
1818 $ . ajax ( {
1919 type : "Get" ,
20- url : instanceURL + "/ .well-known/mytoken-configuration",
20+ url : instanceURL + ( instanceURL . endsWith ( "/" ) ? "" : "/" ) + " .well-known/mytoken-configuration",
2121 success : function ( res ) {
2222 configElements . forEach ( function ( el ) {
2323 storageSet ( el , res [ el ] ) ;
Original file line number Diff line number Diff line change @@ -44,8 +44,12 @@ async function update_tokeninfo() {
4444 let mytokenIss = payload [ 'iss' ] ;
4545 $tokeninfoTypeBadges . hideB ( ) ;
4646 $tokeninfoBadgeTypeJWTInvalid . showB ( ) ;
47+ if ( mytokenIss . endsWith ( "/" ) ) {
48+ mytokenIss = mytokenIss . substring ( 0 , mytokenIss . length - 1 ) ;
49+ }
4750 if ( ! mytokenIss . startsWith ( window . location . href ) ) {
48- await fetch ( mytokenIss + "/.well-known/mytoken-configuration" ) . then ( function ( res ) {
51+ let url = mytokenIss + "/.well-known/mytoken-configuration" ;
52+ await fetch ( url ) . then ( function ( res ) {
4953 return res . json ( ) ;
5054 } ) . then ( function ( data ) {
5155 tokeninfoEndpoint = data [ 'tokeninfo_endpoint' ] ;
You can’t perform that action at this time.
0 commit comments