JBennyHuang / ecosort

0 stars 0 forks source link

Setting up AD B2C #9

Closed JBennyHuang closed 1 month ago

JBennyHuang commented 1 month ago

https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-creation-setup-aad

JBennyHuang commented 1 month ago

https://www.npmjs.com/package/@azure/identity

AnuragVinodh commented 1 month ago

Created a Tenent with AD B2C. Created an resource group called : ecosort-app-rg

AnuragVinodh commented 1 month ago

We will be using this library : react-native-msal

AnuragVinodh commented 1 month ago

We will be using Azure B2C instead of Entra ID :

Microsoft Entra ID (Azure AD):

Intended For: Managing identities of employees, partners, and other organizational users.
Use Cases: Internal applications, corporate resources, and services that require employee authentication.
Features:
    Single sign-on to thousands of SaaS apps.
    Multi-factor authentication.
    Device management and conditional access policies.

Azure AD B2C:

Intended For: Managing identities of external customers or consumers.
Use Cases: Customer-facing applications that require user registration, login, and profile management.
Features:
    Customizable sign-up and sign-in experiences.
    Support for social identities and local accounts.
    Scalability to millions of consumer identities.
JBennyHuang commented 1 month ago

https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-react-samples/b2c-sample

JBennyHuang commented 1 month ago

put all your configuration in .env.example all variables should start with EXPO_PUBLIC_AZURE_AD_B2C_ then update env.d.ts so that you get type completion then update /constants/config.ts throw exceptions for required variables then create a singleton class for the Azure AD B2C follow /lib/llm.ts as a template then create the necessary hooks and contexts to enable authentication guard over the application