Skip to content

Commit 89f2205

Browse files
committed
fix for trying to login again after revoking cli token
1 parent 1f0a41b commit 89f2205

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

apps/webapp/app/services/personalAccessToken.server.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,18 @@ export async function createPersonalAccessTokenFromAuthorizationCode(
210210
},
211211
});
212212

213+
if (existingCliPersonalAccessToken.revokedAt) {
214+
// re-activate revoked CLI PAT so we can use it again
215+
await prisma.personalAccessToken.update({
216+
where: {
217+
id: existingCliPersonalAccessToken.id,
218+
},
219+
data: {
220+
revokedAt: null,
221+
},
222+
});
223+
}
224+
213225
//we don't return the decrypted token
214226
return {
215227
id: existingCliPersonalAccessToken.id,

private-package

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit e21ea6610e7eee1374bb7ba57b98d7dad86e4f6b

0 commit comments

Comments
 (0)