Task #56
openSet Role in Session for Google Authentication Login
0%
Description
When users log in using Google Authentication, the user role is not being set in the session, causing role-based menus and UI elements to not display correctly. ensures that after successful Google login, a default role ID is assigned and stored in the session so that menu visibility and access control work the same as standard login.
***Tables Used (Reference Existing)
users
Field Description
id (PK) Unique user ID
email User email from Google
role_id (FK roles.id) Assigned role ID
is_active Active/inactive status
***roles
Field Description
id (PK) Unique role ID
role_name Role name (Admin/User/etc.)
is_active Active/inactive status
***role_menu_mapping (if applicable)
Field Description
role_id (FK roles.id) Role reference
menu_id (FK menus.id) Menu reference
***validations
*Google authentication must return a valid email ID
*User must exist in users table OR be auto-created if not found
*Default role ID must be valid and active in roles table
*Role ID must be set in session immediately after login
*Inactive users must not be allowed to log in
*Session must contain both user_id and role_id
Updated by Navyamol KB about 1 month ago
- Status changed from In Progress to Resolved