feeef 0.8.9 → 0.8.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -661,6 +661,27 @@ var UserRepository = class extends ModelRepository {
661
661
  const res = await this.client.get(`/${this.resource}/auth/tokens`);
662
662
  return res.data;
663
663
  }
664
+ /**
665
+ * Revokes an access token (session) by opaque identifier from {@link tokens}.
666
+ */
667
+ async revokeAccessToken(identifier) {
668
+ if (!identifier || identifier === "undefined") {
669
+ throw new Error("Missing access token identifier");
670
+ }
671
+ await this.client.delete(`/${this.resource}/auth/tokens/${encodeURIComponent(identifier)}`);
672
+ }
673
+ /** Revokes every access token for the current user (sign out everywhere). */
674
+ async revokeAllAccessTokens() {
675
+ const res = await this.client.post(`/${this.resource}/auth/tokens/revoke-all`);
676
+ return res.data;
677
+ }
678
+ /**
679
+ * Lists OAuth apps that have per-user stored data for the current user (`app_user` rows).
680
+ */
681
+ async connectedApps() {
682
+ const res = await this.client.get(`/${this.resource}/auth/connected-apps`);
683
+ return res.data;
684
+ }
664
685
  /**
665
686
  * Signs in with Google OAuth.
666
687
  * @param options - The OAuth code and optional FCM token.