Open
Conversation
e70c2d5 to
851f039
Compare
- Add personalAccessTokens query to list user's tokens - Add createPersonalAccessToken mutation to create new tokens - Add revokePersonalAccessToken mutation to delete tokens - Publish Sanctum migration for personal_access_tokens table - Add migration for expires_at column (Sanctum 4.x) - Add comprehensive test coverage (10 tests)
- Add TokensPage under Account section with list/create/revoke - Add CreateTokenDialog with random default name placeholder - Add GraphQL queries and mutations for token operations - Add route /account/tokens and sidebar navigation link - Add i18n translations for all token UI strings - Add Vitest unit tests for TokensPage (7 tests)
Restructure the GraphQL API to access personal access tokens via currentUser.tokens instead of a separate personalAccessTokens root query. This provides a more intuitive API design where tokens are accessed as a property of the authenticated user. - Add tokens field to User type using @morphMany directive - Remove personalAccessTokens root query and its resolver - Update frontend query and component to use new path - Update all backend and frontend tests
- Remove blank lines before declare(strict_types=1) - Remove unused import alias - Use fully qualified class name in docblock - Remove spaces after cast statements
851f039 to
024dbb2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request implements support for personal access tokens (API tokens) in both the backend and frontend. It introduces GraphQL queries and mutations for creating, listing, and revoking tokens, adds the necessary database migrations, and provides a user interface for managing tokens in the account section. Comprehensive backend and frontend tests are included to ensure correct functionality and access control.
Backend: Personal Access Token API and Storage
PersonalAccessToken.php,PersonalAccessTokens.php,personal_access_token.graphql). [1] [2] [3]personal_access_tokenstable and support an optionalexpires_atcolumn (2019_12_14_000001_create_personal_access_tokens_table.php,2026_02_05_144709_add_expires_at_to_personal_access_tokens_table.php). [1] [2]PersonalAccessTokenTest.php).Frontend: Token Management UI
TokensPage.vue,CreateTokenDialog.vue,AccountLayout.vue). [1] [2]queries.js,mutations.js). [1] [2]en-US.json).TokensPage.vitest.spec.js).Schema Integration
schema.graphql).