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

Allow unlink oauth_account from user #537

Open
gromdimon opened this issue Feb 21, 2024 · 0 comments
Open

Allow unlink oauth_account from user #537

gromdimon opened this issue Feb 21, 2024 · 0 comments
Labels
enhancement New feature or request javascript Pull requests that update Javascript code python Pull requests that update Python code
Milestone

Comments

@gromdimon
Copy link
Contributor

gromdimon commented Feb 21, 2024

Cannot unlink oauth_account from user

Describe the bug
Currently we can only link new OAuth methods to existing users. However, it'll be useful to have a possibility to unlink this methods.

Expected behavior

  1. There should be some similar route, which will allow to unlink the OAuth method from user.
# Add route for associating OAuth2 account with existing user.
oauth_associate_router = fastapi_users.get_oauth_associate_router(
    oauth_client=oauth_client,
    user_schema=UserRead,
    state_secret=settings.SECRET_KEY,
    redirect_url="/",
)
api_router.include_router(
    oauth_associate_router,
    prefix=f"/auth/external/associate/cookie/{config.name}",
    tags=["auth"],
)

The corresponding question was asked in fastapi-users discusssion

  1. The functionality to unlink OAuth account should be presented in Profile

Additional context
FastAPI-users discussions:
fastapi-users/fastapi-users#1359
fastapi-users/fastapi-users#1360

@gromdimon gromdimon added the enhancement New feature or request label Feb 21, 2024
@gromdimon gromdimon added this to the 1.0.0 milestone Feb 21, 2024
@gromdimon gromdimon added javascript Pull requests that update Javascript code python Pull requests that update Python code labels Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javascript Pull requests that update Javascript code python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

1 participant