Skip to content

Commit

Permalink
update for latest and cleanup readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cicorias committed Apr 15, 2018
1 parent 6592fc0 commit 0ab8e59
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 2 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,39 @@
This is an example of using React, Passport, and Azure Active Directory

## Quick startup

edit the `config.js` file in `./server/config/config.js`

get a secret from the App Settings in AAD on Azure Portal and update in that file:
`clientSecret: process.env.AAD_AUTH_CLIENTSECRET` or set the `ENV` variable.

OR create a `.env` file with

```
AAD_AUTH_CLIENTSECRET=fuLat5eYB8NOT REAL=
```

### AAD App settings
In the Azure AD App, ensure that the App has permissions to `Microsoft Graph`. Specifically under Delegated permissions - `Sign in and read user profile`.

Also, ensure the Reply URLs contains `http://localhost:8080/auth/cbAdfs`



No startup both watcher and nodemon for the server
```
npm i
#the following command launches 2 concurrent processes - one is React's watch, the other id NODE js.
# they are served from the SAME Origin so no CORS concerns.
npm start
open http://localhost:8080
```

Navigate to root, click on the big button - then once logged on click on your email in the upper right corner. This dumps the `jwt` that was supplied on logon.


## Features
- Uses React for the SPA
- Provide your Azure AD Application information in a `.env` file before running.
Expand Down
108 changes: 108 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"babel-loader": "^7.1.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"concurrently": "^3.5.1",
"cross-env": "^5.1.0",
"css-loader": "^0.28.4",
"eslint": "^4.9.0",
Expand All @@ -63,7 +64,8 @@
"scripts": {
"bundle": "npx cross-env NODE_ENV=development webpack",
"deploy": "npx cross-env NODE_ENV=production webpack",
"start": "npx nodemon index.js",
"start-strict": "npx nodemon --use_strict index.js"
"start-dev": "npx nodemon server",
"start": "npx concurrently \"npm run bundle\" \"npx nodemon server\"",
"start-strict": "npx nodemon --use_strict server"
}
}
File renamed without changes.

0 comments on commit 0ab8e59

Please sign in to comment.