-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove token instrospection #5422
base: main
Are you sure you want to change the base?
Conversation
91a6c28
to
a7b81b6
Compare
We detected some changes at packages/*/src and there are no updates in the .changeset. |
a7b81b6
to
2dc254b
Compare
Coverage report
Show files with reduced coverage 🔻
Test suite run success2055 tests passing in 920 suites. Report generated by 🧪jest coverage report action from d4bd953 |
9372323
to
33612c2
Compare
33612c2
to
d4bd953
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/conf-store.d.ts@@ -3,16 +3,14 @@ interface CacheValue<T> {
value: T;
timestamp: number;
}
-export type IntrospectionUrlKey = ;
export type PackageVersionKey = ;
export type NotificationsKey = ;
export type NotificationKey = ;
export type GraphQLRequestKey = ;
type MostRecentOccurrenceKey = ;
type RateLimitKey = ;
-type ExportedKey = IntrospectionUrlKey | PackageVersionKey | NotificationsKey | NotificationKey | GraphQLRequestKey;
+type ExportedKey = PackageVersionKey | NotificationsKey | NotificationKey | GraphQLRequestKey;
interface Cache {
- [introspectionUrlKey: IntrospectionUrlKey]: CacheValue<string>;
[packageVersionKey: PackageVersionKey]: CacheValue<string>;
[notifications: NotificationsKey]: CacheValue<string>;
[notification: NotificationKey]: CacheValue<string>;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! 👏
I think it makes sense to remove the check and be reactive instead. If the token expires or fails, just try to refresh, instead of wasting time checking if it's valid beforehand.
WHY are these changes introduced?
Token instrospection adds an extra query on every command run, but with the new device auth is not really useful.
WHAT is this pull request doing?
Removes the identity token introspection endpoint validation and its associated cache storage. Session validation will now rely solely on token expiration checks rather than making additional HTTP requests to validate tokens.
How to test your changes?
Measuring impact
How do we know this change was effective? Please choose one:
Checklist