sergix44 / XBackBone

A lightweight file manager with full ShareX support and more
https://xbackbone.app
GNU Affero General Public License v3.0
1.02k stars 84 forks source link

Add support for Azure Oauth #600

Open nitin-bhadauria opened 2 months ago

nitin-bhadauria commented 2 months ago

Description

This pull request introduces support for Azure OAuth integration within the XBackBone project. Key changes include:

Key Features

  1. OAuth Integration:

    • Added OAuth authentication flow with Azure AD, allowing users to authenticate using their Azure credentials.
    • Introduced routes and controllers for handling OAuth login, callbacks, and session management.
    • Integrated the thenetworg/oauth2-azure package in composer.json for Azure OAuth support.
  2. External User Management:

    • Differentiated between local and external (OAuth) users.
    • Prevented external users from logging in with a password, ensuring compliance with security standards.
    • Disabled password and email fields for external users to prevent conflicts.
  3. Database Schema Updates:

    • Added a new external column to the users table to identify OAuth users.
    • Updated schemas for both MySQL and SQLite databases.
  4. Localization:

    • Added new language strings for OAuth-related actions and messages.
  5. UI Enhancements:

    • Added a "Login with Azure AD" button on the login page, dynamically shown based on OAuth configuration.
    • Updated the user edit page to manage external users more effectively.
  6. Security Enhancements:

    • Ensured secure handling of sensitive data, such as access tokens.
    • Updated session management to support external users.

Files Changed

Impact

This update adds a significant feature to the XBackBone project, enabling enterprises using Azure AD to manage user authentication seamlessly. The changes also ensure that external users are managed securely, enhancing overall security and user experience.


Please review the changes and provide feedback or approve the pull request if everything is satisfactory.