Skip to content

Commit 7bb6acf

Browse files
authored
fix(server): m2m token generation endpoint (#84)
* fix(server): m2m token generation endpoint Signed-off-by: Asitha de Silva <asithade@gmail.com> * fix(server): m2m auth0 issuer base url Signed-off-by: Asitha de Silva <asithade@gmail.com> --------- Signed-off-by: Asitha de Silva <asithade@gmail.com>
1 parent 8a9d902 commit 7bb6acf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/lfx-pcc/src/server/utils/m2m-token.util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function generateM2MToken(req: Request): Promise<string> {
2929

3030
// Select the appropriate request configuration
3131
const config = isAuthelia ? AUTHELIA_TOKEN_REQUEST : AUTH0_TOKEN_REQUEST;
32-
const tokenEndpoint = `${issuerBaseUrl}/${config.endpoint}`;
32+
const tokenEndpoint = new URL(config.endpoint, issuerBaseUrl).toString();
3333

3434
// Prepare request options based on auth provider
3535
const requestOptions = {

0 commit comments

Comments
 (0)