Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
fix(magic-link):delete previous tokens (#10258)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeplascdev authored May 28, 2024
1 parent d00f659 commit bd184fa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class MagicLinkService implements ServiceInterface<MagicLinkParams> {
})
// Keep only the latest token and remove the rest
if (previousTokens.total > 1) {
const tokensToRemove = previousTokens.data.slice(0, -1)
const tokensToRemove = previousTokens.data.slice(1)
for (const token of tokensToRemove) {
await loginTokenService.remove(token.id)
}
Expand Down

0 comments on commit bd184fa

Please sign in to comment.