Skip to content
Snippets Groups Projects

Polished auth flow including ReservedRoute and role selection.

Merged Defendi Alberto requested to merge feature/privateroute/role into dev
1 file
+ 8
0
Compare changes
  • Side-by-side
  • Inline
+ 8
0
 
import axios from 'axios';
 
 
/**
 
* Ask the server all the roles of an user if the user has multiple roles.
 
* @returns array of roles.
 
*/
 
export const getRoles = async (): Promise<string[]> =>
 
axios('/api/web/login/get_roles').then((res) => res.data.roles);
Loading