-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat: introduce personal access tokens for authorization #4094
Open
jamesgeorge007
wants to merge
5
commits into
next
Choose a base branch
from
feat/pat-ui-changes
base: next
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
acbea3a
to
29614eb
Compare
39d0631
to
b0cbfe9
Compare
nivedin
requested changes
Jun 5, 2024
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.
please look into this comments
packages/hoppscotch-common/src/components/accessTokens/GenerateModal.vue
Outdated
Show resolved
Hide resolved
packages/hoppscotch-common/src/components/accessTokens/List.vue
Outdated
Show resolved
Hide resolved
4 tasks
nivedin
approved these changes
Jun 7, 2024
- Grid layout updates improving responsiveness. - Reply on placeholder for the Label input element in the generate modal instead of a label appearing below. - Add empty and error states for the access tokens list view. - Cleanup Co-authored-by: Nivedin <53208152+nivedin@users.noreply.github.com>
…lution This is required in the case of cloud where the Auth token is available as an observable.
782b722
to
29d90f4
Compare
- Add a loading state for the initial page load if the user visits the `Tokens` tab immediately. - Show `Expired` as the text if the current date exceeds the token expiration date. - Toggle the error state during create/delete PAT actions if it was set. - Cleanup.
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.
Description
This PR includes the UI changes adding support for Personal Access Tokens (tokens associated with a user) providing a mechanism for authorization to access certain services and APIs the Hoppscotch platform offers. Currently, collections and environments from any team workspace (user having access to) can be accessed via PAT primarily for usage in the CLI, #4095.
The BE changes were added in #4079.
Closes HFE-519.
Changes
profile
page corresponding to personal access tokens.AccessTokens
(parent component where other presentational components are rendered and include all business logic),AccessTokensOverview
,AccessTokensList
, andAccessTokensGenerateModal
components compiling various flows wrt personal access tokens.i18n
string entry additions.includeTime
to the shortDateTime helper function that defaults totrue
for an additional use case of conditionally including the time.Preview
pat-ui-flow.mov
Checks
Note to reviewers
Currently, the network call to fetch the list of access tokens gets triggered while at the
Account
tab. A potential optimization that can be done here is ensuring the data fetch happens only while the respective tab is visited. The existing implementation ensures inactive tab contents are rendered (via therender-inactive-tabs
prop forHoppSmartTabs
) while landing on the initialAccount
tab and thought to revisit it separately as required.hoppscotch/packages/hoppscotch-common/src/pages/profile.vue
Lines 74 to 78 in acbea3a
There's a layout shift while switching between the tabs under the profile page. A pre-existing issue that can be tackled separately.
Since more subviews are getting added under the profile page, we could think in the direction of having dedicated routes for subviews where the common header element gets rendered at the parent
/profile
route with a slot for child routes/profile/account
, etc later on.