-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4605 from AzureAD/angular13-sample-apps
MSAL Angular - Angular 13 Support - RxJS 6/7 Sample Apps
- Loading branch information
Showing
85 changed files
with
2,620 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
change/@azure-msal-angular-8f602981-ceaf-457b-9710-7afdfeb9fcae.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "minor", | ||
"comment": "Add support for rxjs v7 and Angular 13 #4605", | ||
"packageName": "@azure/msal-angular", | ||
"email": "rginsburg@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
samples/msal-angular-v2-samples/angular13-rxjs6-sample-app/.browserslistrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. | ||
# For additional information regarding the format and rule options, please see: | ||
# https://github.com/browserslist/browserslist#queries | ||
|
||
# For the full list of supported browsers by the Angular framework, please see: | ||
# https://angular.io/guide/browser-support | ||
|
||
# You can see what browsers were selected by your queries by running: | ||
# npx browserslist | ||
|
||
last 1 Chrome version | ||
last 1 Firefox version | ||
last 2 Edge major versions | ||
last 2 Safari major versions | ||
last 2 iOS major versions | ||
Firefox ESR |
16 changes: 16 additions & 0 deletions
16
samples/msal-angular-v2-samples/angular13-rxjs6-sample-app/.editorconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.ts] | ||
quote_type = single | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
44 changes: 44 additions & 0 deletions
44
samples/msal-angular-v2-samples/angular13-rxjs6-sample-app/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# Compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
/bazel-out | ||
|
||
# Node | ||
/node_modules | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# IDEs and editors | ||
.idea/ | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# Visual Studio Code | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
.history/* | ||
|
||
# Miscellaneous | ||
/.angular/cache | ||
.sass-cache/ | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
testem.log | ||
/typings | ||
|
||
# System files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
package-lock.json |
1 change: 1 addition & 0 deletions
1
samples/msal-angular-v2-samples/angular13-rxjs6-sample-app/.npmrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
24 changes: 24 additions & 0 deletions
24
samples/msal-angular-v2-samples/angular13-rxjs6-sample-app/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Angular 13 RxJS6 MSAL Angular v2 Sample | ||
|
||
This developer sample is used to demonstrate how to use `@azure/msal-angular`. | ||
|
||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.6. | ||
|
||
## How to run the sample | ||
|
||
### Pre-requisites | ||
- Ensure [all pre-requisites](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/README.md) have been completed to run msal-angular. | ||
|
||
### Configure the application | ||
- Open `./src/app/app.modules.ts` in an editor. | ||
- Replace client id with the Application (client) ID from the portal registration, or use the currently configured lab registration. | ||
- Optionally, you may replace any of the other parameters, or you can remove them and use the default values. | ||
|
||
### Running the sample | ||
- In a command prompt, run `npm start`. | ||
- Navigate to [http://localhost:4200](http://localhost:4200) | ||
- In the web page, click on the "Login" button. The app will automatically reload if you change any of the source files. | ||
|
||
## Additional notes | ||
- The default interaction type for the sample is redirects. The sample can be configured to use redirects by changing the `interactionType` in `app.module.ts` to `InteractionType.Popup`. | ||
|
108 changes: 108 additions & 0 deletions
108
samples/msal-angular-v2-samples/angular13-rxjs6-sample-app/angular.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"angular13-rxjs6-sample-app": { | ||
"projectType": "application", | ||
"schematics": { | ||
"@schematics/angular:application": { | ||
"strict": true | ||
} | ||
}, | ||
"root": "", | ||
"sourceRoot": "src", | ||
"prefix": "app", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "dist/angular13-rxjs6-sample-app", | ||
"index": "src/index.html", | ||
"main": "src/main.ts", | ||
"polyfills": "src/polyfills.ts", | ||
"tsConfig": "tsconfig.app.json", | ||
"assets": [ | ||
"src/favicon.ico", | ||
"src/assets" | ||
], | ||
"styles": [ | ||
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", | ||
"src/styles.css" | ||
], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"budgets": [ | ||
{ | ||
"type": "initial", | ||
"maximumWarning": "500kb", | ||
"maximumError": "1mb" | ||
}, | ||
{ | ||
"type": "anyComponentStyle", | ||
"maximumWarning": "2kb", | ||
"maximumError": "4kb" | ||
} | ||
], | ||
"fileReplacements": [ | ||
{ | ||
"replace": "src/environments/environment.ts", | ||
"with": "src/environments/environment.prod.ts" | ||
} | ||
], | ||
"outputHashing": "all" | ||
}, | ||
"development": { | ||
"buildOptimizer": false, | ||
"optimization": false, | ||
"vendorChunk": true, | ||
"extractLicenses": false, | ||
"sourceMap": true, | ||
"namedChunks": true | ||
} | ||
}, | ||
"defaultConfiguration": "production" | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "angular13-rxjs6-sample-app:build:production" | ||
}, | ||
"development": { | ||
"browserTarget": "angular13-rxjs6-sample-app:build:development" | ||
} | ||
}, | ||
"defaultConfiguration": "development" | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "angular13-rxjs6-sample-app:build" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "src/test.ts", | ||
"polyfills": "src/polyfills.ts", | ||
"tsConfig": "tsconfig.spec.json", | ||
"karmaConfig": "karma.conf.js", | ||
"assets": [ | ||
"src/favicon.ico", | ||
"src/assets" | ||
], | ||
"styles": [ | ||
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", | ||
"src/styles.css" | ||
], | ||
"scripts": [] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"defaultProject": "angular13-rxjs6-sample-app" | ||
} |
9 changes: 9 additions & 0 deletions
9
samples/msal-angular-v2-samples/angular13-rxjs6-sample-app/jest.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
displayName: "angular13-rxjs6-sample-app", | ||
globals: { | ||
__PORT__: 4209, | ||
__STARTCMD__: "npm start -- --port 4209", | ||
__TIMEOUT__: 90000 | ||
}, | ||
preset: "../../e2eTestUtils/jest-puppeteer-utils/jest-preset.js" | ||
}; |
44 changes: 44 additions & 0 deletions
44
samples/msal-angular-v2-samples/angular13-rxjs6-sample-app/karma.conf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/1.0/config/configuration-file.html | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['jasmine', '@angular-devkit/build-angular'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-jasmine-html-reporter'), | ||
require('karma-coverage'), | ||
require('@angular-devkit/build-angular/plugins/karma') | ||
], | ||
client: { | ||
jasmine: { | ||
// you can add configuration options for Jasmine here | ||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html | ||
// for example, you can disable the random execution with `random: false` | ||
// or set a specific seed with `seed: 4321` | ||
}, | ||
clearContext: false // leave Jasmine Spec Runner output visible in browser | ||
}, | ||
jasmineHtmlReporter: { | ||
suppressAll: true // removes the duplicated traces | ||
}, | ||
coverageReporter: { | ||
dir: require('path').join(__dirname, './coverage/angular13-rxjs6-sample-app'), | ||
subdir: '.', | ||
reporters: [ | ||
{ type: 'html' }, | ||
{ type: 'text-summary' } | ||
] | ||
}, | ||
reporters: ['progress', 'kjhtml'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
singleRun: false, | ||
restartOnFileChange: true | ||
}); | ||
}; |
54 changes: 54 additions & 0 deletions
54
samples/msal-angular-v2-samples/angular13-rxjs6-sample-app/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"name": "angular13-rxjs6-sample-app", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"test": "ng test", | ||
"lint": "ng lint", | ||
"e2e": "jest", | ||
"install:local": "npm install ../../../lib/msal-angular/dist ../../../lib/msal-browser", | ||
"install:published": "npm install @azure/msal-angular@latest @azure/msal-browser@latest" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/animations": "~13.2.0", | ||
"@angular/cdk": "^13.2.6", | ||
"@angular/common": "~13.2.0", | ||
"@angular/compiler": "~13.2.0", | ||
"@angular/core": "~13.2.0", | ||
"@angular/forms": "~13.2.0", | ||
"@angular/material": "^13.2.6", | ||
"@angular/platform-browser": "~13.2.0", | ||
"@angular/platform-browser-dynamic": "~13.2.0", | ||
"@angular/router": "~13.2.0", | ||
"@azure/msal-angular": "^2.1.2", | ||
"@azure/msal-browser": "^2.22.1", | ||
"core-js": "^3.21.1", | ||
"rxjs": "~6.5.0", | ||
"tslib": "^2.3.0", | ||
"zone.js": "~0.11.4" | ||
}, | ||
"devDependencies": { | ||
"@angular-devkit/build-angular": "~13.2.6", | ||
"@angular/cli": "~13.2.6", | ||
"@angular/compiler-cli": "~13.2.0", | ||
"@types/jasmine": "~3.10.0", | ||
"@types/jasminewd2": "^2.0.10", | ||
"@types/node": "^12.11.1", | ||
"jasmine-core": "~4.0.0", | ||
"jasmine-spec-reporter": "^7.0.0", | ||
"jest": "^27.5.1", | ||
"karma": "~6.3.0", | ||
"karma-chrome-launcher": "~3.1.0", | ||
"karma-coverage": "~2.1.0", | ||
"karma-coverage-istanbul-reporter": "^3.0.3", | ||
"karma-jasmine": "~4.0.0", | ||
"karma-jasmine-html-reporter": "~1.7.0", | ||
"protractor": "^7.0.0", | ||
"ts-node": "^10.7.0", | ||
"tslint": "^6.1.3", | ||
"typescript": "~4.5.2" | ||
} | ||
} |
Oops, something went wrong.