FIX: Allow user to log in another account using the same device (client_id) (#29121)

Allow user to log in another account using the same device (client_id)
This commit is contained in:
Natalie Tay
2024-10-14 12:39:20 +08:00
committed by GitHub
parent d3f09f8f61
commit ede06ffd43
2 changed files with 21 additions and 2 deletions

View File

@ -61,8 +61,7 @@ class UserApiKeysController < ApplicationController
@application_name = params[:application_name]
scopes = params[:scopes].split(",")
# destroy any old keys we had
UserApiKey.where(user_id: current_user.id, client_id: params[:client_id]).destroy_all
UserApiKey.where(client_id: params[:client_id]).destroy_all
key =
UserApiKey.create!(