Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: delete API token in /logout API#1770

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
AbhineetJain merged 19 commits intomainfromabhineetjain/delete-session-token-api
May 27, 2022

Conversation

AbhineetJain
Copy link
Contributor

@AbhineetJainAbhineetJain commentedMay 26, 2022
edited
Loading

This PR deletes the API token from the database on logout via the API. Should fix this for both UI and CLI.

Subtasks

  • add DeleteAPIKeyByID query
  • delete API Key on logout request
  • call /logout from CLI
  • add and fix unit tests

Fixes#1714

@AbhineetJainAbhineetJain requested a review fromEmyrkMay 26, 2022 01:39
@AbhineetJain
Copy link
ContributorAuthor

Updated the error messaging with the CLI logout flow. It collects all the errors and spits them out at the end:

Failed to log out.                                                                        remove URL file: remove /home/coder/.config/coderv2/url: permission denied                remove session file: remove /home/coder/.config/coderv2/session: permission deniedRun 'coder logout --help' for usage.

@AbhineetJain
Copy link
ContributorAuthor

Getting this error for Windows:

panic: runtime error: invalid memory address or nil pointer dereference[signal 0xc0000005 code=0x0 addr=0x18 pc=0x1f703df]

@AbhineetJainAbhineetJain marked this pull request as ready for reviewMay 27, 2022 17:18
@AbhineetJainAbhineetJain merged commitd623eeb intomainMay 27, 2022
@AbhineetJainAbhineetJain deleted the abhineetjain/delete-session-token-api branchMay 27, 2022 20:47
kylecarbs pushed a commit that referenced this pull requestJun 10, 2022
* delete API token in logout api* add deleteapikeybyid to databasefake* set blank cookie on logout always* refactor logout flow, add unit tests* update logout messsage* use read-only file mode for windows* fix file mode on windows for cleanup* change file permissions on windows* assert error is not nil* refactor cli* try different file mode on windows* try different file mode on windows* try keeping the files open on Windows* fix the error message on Windows
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@EmyrkEmyrkEmyrk approved these changes

@kylecarbskylecarbskylecarbs approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

feat: API endpoint to delete the session token on server side
3 participants
@AbhineetJain@Emyrk@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp