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

feat: add endpoint to unlink identity from user #1315

Merged
merged 4 commits into from
Nov 21, 2023

Conversation

kangmingtay
Copy link
Member

What kind of change does this PR introduce?

  • Adds an endpoint DELETE /user/identities/{identity_id} to allow the user to unlink an identity
  • User is only allowed to unlink an identity if they have more than 1 identity linked
  • User must be authenticated to unlink the identity
// successful request
$ curl -X DELETE 'http://localhost:9999/user/identities/{identity_id}' -H 'Authorization: Bearer <user's JWT>'
{}

@kangmingtay kangmingtay requested a review from a team as a code owner November 20, 2023 18:03
Copy link
Contributor

@hf hf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

migrations/20231117164230_add_id_pkey_identities.up.sql Outdated Show resolved Hide resolved
@kangmingtay kangmingtay merged commit af83b34 into master Nov 21, 2023
2 checks passed
@kangmingtay kangmingtay deleted the km/feat-unlink-identity branch November 21, 2023 15:23
Copy link
Contributor

🎉 This PR is included in version 2.117.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?
* Adds an endpoint `DELETE /user/identities/{identity_id}` to allow the
user to unlink an identity
* User is only allowed to unlink an identity if they have more than 1
identity linked
* User must be authenticated to unlink the identity

```curl
// successful request
$ curl -X DELETE 'http://localhost:9999/user/identities/{identity_id}' -H 'Authorization: Bearer <user's JWT>'
{}
```

---------

Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?
* Adds an endpoint `DELETE /user/identities/{identity_id}` to allow the
user to unlink an identity
* User is only allowed to unlink an identity if they have more than 1
identity linked
* User must be authenticated to unlink the identity

```curl
// successful request
$ curl -X DELETE 'http://localhost:9999/user/identities/{identity_id}' -H 'Authorization: Bearer <user's JWT>'
{}
```

---------

Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
## What kind of change does this PR introduce?
* Adds an endpoint `DELETE /user/identities/{identity_id}` to allow the
user to unlink an identity
* User is only allowed to unlink an identity if they have more than 1
identity linked
* User must be authenticated to unlink the identity

```curl
// successful request
$ curl -X DELETE 'http://localhost:9999/user/identities/{identity_id}' -H 'Authorization: Bearer <user's JWT>'
{}
```

---------

Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants