Giter VIP home page Giter VIP logo

manasmdg3 / msal-angular-tutorial Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 230 KB

This project is based on msal-angular library's official tutorial for Angular Single Page Application or SLA The goal of this demo is to Sign in users and call the Microsoft Graph API from an Angular single-page application (SPA) using auth code flow.

License: MIT License

TypeScript 89.38% HTML 10.05% CSS 0.58%
angular azure-active-directory azuread msal-angular msal-authentication msal-browser msal-library

msal-angular-tutorial's Introduction

MsalAngularTutorial

This project was generated with Angular CLI version 15.1.2.
This is based on msal-angular library official tutorial for Angular Single Page Application or SLA

The goal of this demo is to Sign in users and call the Microsoft Graph API from an Angular single-page application (SPA) using auth code flow; as stated in the official documentation.

Libraries used

MSAL Angular Microsoft Authentication Library for JavaScript Angular Wrapper
MSAL Browser Microsoft Authentication Library for JavaScript v2 browser package

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

npm install -g @angular/cli # Install the Angular CLI
ng new msal-angular-tutorial --routing=true --style=css --strict=false # Generate a new Angular app
cd msal-angular-tutorial # Change to the app directory
npm install @angular/material @angular/cdk # Install the Angular Material component library (optional, for UI)
npm install @azure/msal-browser @azure/msal-angular # Install MSAL Browser and MSAL Angular in your application
ng generate component home # To add a home page
ng generate component profile # To add a profile page
`

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

msal-angular-tutorial's People

Contributors

manasmdg3 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.