Skip to content

Commit 374f25f

Browse files
Add iframe content-type, better error for stale ID token keys
1 parent ade86c0 commit 374f25f

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎demo/login_iframe_inline.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5+
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
56
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
67
<script type="text/javascript">
78
var parent, pageUrl

‎src/index.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ class ClientAuthOIDC {
7070
let accessToken = response.params.access_token
7171
return this.dispatchLoginSuccess(webId, accessToken)
7272
})
73+
.catch(error => {
74+
if (error.message === 'Cannot resolve signing key for ID Token.') {
75+
console.error('ID Token found, but could not validate. Provider likely has changed their public keys. Not signed in.')
76+
} else {
77+
throw error
78+
}
79+
})
7380
}
7481

7582
dispatchLoginSuccess (webId, accessToken) {

0 commit comments

Comments
 (0)