Skip to content

Commit

Permalink
refactor: removed unused const + test consistency fix
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Oct 24, 2024
1 parent e2b1af3 commit aa2fb4f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
1 change: 0 additions & 1 deletion lib/build/recipe/oauth2provider/constants.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-nocheck
export declare const OAUTH2_BASE_PATH = "/oauth/";
export declare const LOGIN_PATH = "/oauth/login";
export declare const AUTH_PATH = "/oauth/auth";
export declare const TOKEN_PATH = "/oauth/token";
Expand Down
3 changes: 1 addition & 2 deletions lib/build/recipe/oauth2provider/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.LOGOUT_PATH = exports.END_SESSION_PATH = exports.INTROSPECT_TOKEN_PATH = exports.REVOKE_TOKEN_PATH = exports.USER_INFO_PATH = exports.LOGIN_INFO_PATH = exports.TOKEN_PATH = exports.AUTH_PATH = exports.LOGIN_PATH = exports.OAUTH2_BASE_PATH = void 0;
exports.OAUTH2_BASE_PATH = "/oauth/";
exports.LOGOUT_PATH = exports.END_SESSION_PATH = exports.INTROSPECT_TOKEN_PATH = exports.REVOKE_TOKEN_PATH = exports.USER_INFO_PATH = exports.LOGIN_INFO_PATH = exports.TOKEN_PATH = exports.AUTH_PATH = exports.LOGIN_PATH = void 0;
exports.LOGIN_PATH = "/oauth/login";
exports.AUTH_PATH = "/oauth/auth";
exports.TOKEN_PATH = "/oauth/token";
Expand Down
2 changes: 0 additions & 2 deletions lib/ts/recipe/oauth2provider/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
* under the License.
*/

export const OAUTH2_BASE_PATH = "/oauth/";

export const LOGIN_PATH = "/oauth/login";
export const AUTH_PATH = "/oauth/auth";
export const TOKEN_PATH = "/oauth/token";
Expand Down
28 changes: 12 additions & 16 deletions test/test-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,22 +304,18 @@ function initST(config: any) {
);
}
if (recipe.recipeId === "oauth2provider") {
let initConfig: OAuth2ProviderTypeInput = {
...config,
};
if (initConfig.override?.functions) {
initConfig.override = {
...initConfig.override,
functions: getFunc(`${initConfig.override.functions}`),
};
}
if (initConfig.override?.apis) {
initConfig.override = {
...initConfig.override,
apis: getFunc(`${initConfig.override.apis}`),
};
}
recipeList.push(OAuth2Provider.init(initConfig));
recipeList.push(
OAuth2Provider.init({
...config,
override: {
apis: overrideBuilderWithLogging("OAuth2Provider.override.apis", config?.override?.apis),
functions: overrideBuilderWithLogging(
"OAuth2Provider.override.functions",
config?.override?.functions
),
},
})
);
}
});

Expand Down

0 comments on commit aa2fb4f

Please sign in to comment.