Skip to content

Commit a4cca2e

Browse files
committed
fix: include YIVI_SERVER_TOKEN when verifying session result from IRMA server
1 parent 0b42a5f commit a4cca2e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/lib/server/auth/yivi.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ export async function verifyYiviSession(irmaSessionToken: string): Promise<{
3333
valid: boolean;
3434
attributes: Record<string, string>;
3535
}> {
36+
const headers: Record<string, string> = {};
37+
if (YIVI_SERVER_TOKEN) headers['Authorization'] = YIVI_SERVER_TOKEN;
38+
3639
const response = await fetch(`${YIVI_SERVER_URL}/session/${irmaSessionToken}/result`, {
37-
method: 'GET'
40+
method: 'GET',
41+
headers
3842
});
3943

4044
if (!response.ok) {

0 commit comments

Comments
 (0)