mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-02 08:09:19 +08:00
Remove profile-auth prefix from 2fa routes
This commit is contained in:
parent
cef2839320
commit
f0e42a0a1e
4 changed files with 10 additions and 10 deletions
|
@ -179,7 +179,7 @@ export class AuthService {
|
|||
}
|
||||
|
||||
public enable2fa(): Observable<any> {
|
||||
let route = './profile-auth/2fa/enable';
|
||||
let route = './2fa/enable';
|
||||
route = this.baseRoute.appendNativeAuth(route);
|
||||
|
||||
route = this.baseRoute.calculateRoute(route);
|
||||
|
@ -207,7 +207,7 @@ export class AuthService {
|
|||
|
||||
public finalize2fa(code: string): Observable<any> {
|
||||
|
||||
let route = './profile-auth/2fa/enable-finalize';
|
||||
let route = './2fa/enable-finalize';
|
||||
|
||||
route = this.baseRoute.appendNativeAuth(route);
|
||||
route = this.baseRoute.calculateRoute(route);
|
||||
|
|
|
@ -142,7 +142,7 @@ class SecurityController extends AbstractController
|
|||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Route('/profile-auth/2fa/enable', name: 'app_2fa_enable', methods: ["GET", "POST"])]
|
||||
#[Route('/2fa/enable', name: 'app_2fa_enable', methods: ["GET", "POST"])]
|
||||
#[isGranted('IS_AUTHENTICATED_FULLY')]
|
||||
public function enable2fa(#[CurrentUser] ?User $user, TotpAuthenticatorInterface $totpAuthenticator): Response
|
||||
{
|
||||
|
@ -176,7 +176,7 @@ class SecurityController extends AbstractController
|
|||
return new Response(json_encode($response), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
#[Route('/profile-auth/2fa/disable', name: 'app_2fa_disable', methods: ["GET"])]
|
||||
#[Route('/2fa/disable', name: 'app_2fa_disable', methods: ["GET"])]
|
||||
public function disable2fa(#[CurrentUser] ?User $user, TotpAuthenticatorInterface $totpAuthenticator): Response
|
||||
{
|
||||
error_log('inside disable 2fa');
|
||||
|
@ -192,7 +192,7 @@ class SecurityController extends AbstractController
|
|||
return $this->redirect('../#/users/edit/'.$id);
|
||||
}
|
||||
|
||||
#[Route('/profile-auth/2fa/enable-finalize', name: 'app_2fa_enable_finalize', methods: ["GET", "POST"])]
|
||||
#[Route('/2fa/enable-finalize', name: 'app_2fa_enable_finalize', methods: ["GET", "POST"])]
|
||||
public function enableFinalize2fa(#[CurrentUser] ?User $user, Security $security, Request $request, TotpAuthenticatorInterface $totpAuthenticator): Response
|
||||
{
|
||||
error_log('inside enableFinalize2fa');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue