Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

### Breaking Changes

- [#1607](https://github.com/okta/okta-auth-js/pull/1607) bumps minimum node version to 20
- [#1607](https://github.com/okta/okta-auth-js/pull/1607) chore: bumps minimum node version to 20
- [#1609](https://github.com/okta/okta-auth-js/pull/1609) fix: removes `claims` from `AccessToken`. ATs are no longer automatically decoded

# 7.14.0

Expand Down
2 changes: 0 additions & 2 deletions lib/oidc/handleOAuthResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,8 @@ export async function handleOAuthResponse(
const now = Math.floor(Date.now()/1000);

if (accessToken) {
const accessJwt = sdk.token.decode(accessToken);
tokenDict.accessToken = {
accessToken: accessToken,
claims: accessJwt.payload,
expiresAt: Number(expiresIn) + now,
tokenType: tokenType!,
scopes: scopes,
Expand Down
1 change: 0 additions & 1 deletion lib/oidc/types/Token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export interface AbstractToken {

export interface AccessToken extends AbstractToken {
accessToken: string;
claims: UserClaims;
tokenType: string;
userinfoUrl: string;
dpopPairId?: string;
Expand Down
3 changes: 0 additions & 3 deletions test/spec/oidc/revokeToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ function setupSync(options?) {
function createAccessToken(strValue): AccessToken {
return {
accessToken: strValue,
claims: {
sub: ''
},
userinfoUrl: '',
authorizeUrl: '',
tokenType: 'accessToken',
Expand Down
2 changes: 0 additions & 2 deletions test/support/tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ tokens.standardAccessTokenClaims = {

tokens.standardAccessTokenParsed = {
accessToken: tokens.standardAccessToken,
claims: tokens.standardAccessTokenClaims,
expiresAt: 1449703529, // assuming time = tokens.time
scopes: ['openid', 'email'],
tokenType: 'Bearer',
Expand Down Expand Up @@ -327,7 +326,6 @@ tokens.authServerAccessTokenClaims = {

tokens.authServerAccessTokenParsed = {
accessToken: tokens.authServerAccessToken,
claims: tokens.authServerAccessTokenClaims,
expiresAt: 1449703529, // assuming time = tokens.time
scopes: ['openid', 'email'],
tokenType: 'Bearer',
Expand Down