Skip to content
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

Add revoke method #72

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Add revoke method #72

merged 1 commit into from
Mar 26, 2024

Conversation

marcomontalbano
Copy link
Member

@marcomontalbano marcomontalbano commented Mar 26, 2024

What I did

I added a revoke method.

Any previously generated access tokens (refresh tokens included) can be revoked before their natural expiration date.

import { revoke } from '@commercelayer/js-auth'

await revoke({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
  token: 'a-generated-access-token'
})

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

@marcomontalbano marcomontalbano self-assigned this Mar 26, 2024
@marcomontalbano marcomontalbano added the enhancement New feature or request label Mar 26, 2024
@marcomontalbano marcomontalbano marked this pull request as ready for review March 26, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants