зеркало из https://github.com/mozilla/fxa.git
Fixes incorrect name for the id of refreshToken
This commit is contained in:
Родитель
db7e82a724
Коммит
613ad4c213
|
@ -600,7 +600,7 @@ module.exports = (
|
|||
credentials.uid
|
||||
)) {
|
||||
// OAuth annoyingly returns buffers rather than hex strings.
|
||||
oauthRefreshTokensById.set(hex(token.refreshTokenId), token);
|
||||
oauthRefreshTokensById.set(hex(token.tokenId), token);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1695,13 +1695,13 @@ describe('/account/devices', () => {
|
|||
getRefreshTokensByUid: sinon.spy(async () => {
|
||||
return [
|
||||
{
|
||||
refreshTokenId: Buffer.from(refreshTokenId, 'hex'),
|
||||
tokenId: Buffer.from(refreshTokenId, 'hex'),
|
||||
lastUsedAt: new Date(now),
|
||||
},
|
||||
// This extra refreshToken should be ignored when listing devices,
|
||||
// since it doesn't have a corresponding device record.
|
||||
{
|
||||
refreshTokenId: crypto.randomBytes(16),
|
||||
tokenId: crypto.randomBytes(16),
|
||||
lastUsedAt: new Date(now),
|
||||
},
|
||||
];
|
||||
|
|
Загрузка…
Ссылка в новой задаче