Skip to content

feat: add revokeRefreshToken functionality and update documentation - #778

Open
siddhikotak wants to merge 1 commit into
mainfrom
feat/revoke-refresh-token
Open

siddhikotak wants to merge 1 commit into
mainfrom
feat/revoke-refresh-token

Conversation

@siddhikotak

@siddhikotak siddhikotak commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Adds revokeRefreshToken() to useAuth0() / $auth0, wrapping the method added in @auth0/auth0-spa-js. It revokes the refresh token via /oauth/revoke, so it can no longer be used to get new access tokens.

References

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

🤖 Generated with Claude Code

@siddhikotak
siddhikotak requested a review from a team as a code owner November 6, 2026 06:21
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Vue client adds revokeRefreshToken(), exposes its options type, and forwards calls to the Auth0 client. Tests cover call forwarding, errors, and authentication state updates. Examples describe revocation behavior across refresh-token modes.

Changes: Refresh token revocation

Layer / File(s) Summary
Expose and validate refresh-token revocation
src/global.ts, src/interfaces/auth0-vue-client.ts, src/plugin.ts, __tests__/plugin.test.ts, EXAMPLES.md
The client interface and plugin expose revokeRefreshToken() with optional options. Tests cover forwarding, error handling, and authentication state updates. The examples document usage and mode-specific behavior.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Caller as Vue application
  participant Plugin as Auth0Plugin
  participant Proxy as __proxy
  participant Client as Auth0 SPA client
  participant State as Reactive authentication state
  Caller->>Plugin: revokeRefreshToken(options)
  Plugin->>Proxy: Forward method and options
  Proxy->>Client: Call revokeRefreshToken(options)
  Client-->>Proxy: Resolve or reject
  Proxy->>State: Refresh authentication state and update error
  Proxy-->>Caller: Return result or rethrow error
Loading

Suggested reviewers: yogeshchoudhary147

Merge Risk: Minimal · up to a699d

The revocation API is compatible with the declared SDK version, with no identified issue blocking merge after normal checks.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title identifies the main change, adding revokeRefreshToken, and the documentation update.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 4 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

__tests__/plugin.test.ts

Parsing error: ESLint was configured to run on <tsconfigRootDir>/__tests__/plugin.test.ts using parserOptions.project: /tsconfig.json
However, that TSConfig does not include this file. Either:

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 106df80 and a699d71.

Files selected for processing: 5

  • EXAMPLES.md
  • __tests__/plugin.test.ts
  • src/global.ts
  • src/interfaces/auth0-vue-client.ts
  • src/plugin.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant