├── public_html
├── auth0_logo_final_blue_RGB.png
├── README.md
├── index.html
├── app.css
└── app.js
├── .gitignore
├── LICENSE
└── README.md
/public_html/auth0_logo_final_blue_RGB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lyric/auth0-sso-sample/master/public_html/auth0_logo_final_blue_RGB.png
--------------------------------------------------------------------------------
/public_html/README.md:
--------------------------------------------------------------------------------
1 | # app1.com
2 |
3 | This is the starting point for the SSO example. Remember to start all 3 apps to try everything out and to [configure `/etc/hosts` correctly](https://github.com/auth0/auth0-sso-sample#running)
4 |
5 | ## Running the example
6 |
7 | In order to run the example you need to just start a server. What we suggest is doing the following:
8 |
9 | 1. Install node
10 | 2. run `npm install -g serve`
11 | 3. run `serve` in the directory of this project.
12 |
13 | Go to `http://app1.com:3000` and you'll see the app running :).
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 |
5 | # Runtime data
6 | pids
7 | *.pid
8 | *.seed
9 |
10 | # Directory for instrumented libs generated by jscoverage/JSCover
11 | lib-cov
12 |
13 | # Coverage directory used by tools like istanbul
14 | coverage
15 |
16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17 | .grunt
18 |
19 | # Compiled binary addons (http://nodejs.org/api/addons.html)
20 | build/Release
21 |
22 | # Dependency directory
23 | # Commenting this out is preferred by some people, see
24 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
25 | node_modules
26 |
27 | # Users Environment Variables
28 | .lock-wscript
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Auth0
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SSO sample
2 |
3 | This is the example for the [SSO article](https://docs.auth0.com/sso/single-sign-on). In here, you'll see how to implement SSO between Single Page Apps and Regular Web Apps using Auth0.
4 |
5 | ## Structure
6 |
7 | In this example, we have 3 applications:
8 |
9 | * app1.com (single page app)
10 | * app2.com (single page app)
11 | * app3.com (regular web app)
12 |
13 | Each application has its own folder in this repository with its own instructions on how to run it.
14 |
15 | ## Running
16 |
17 | In order to be able to test SSO correctly, each application must have its own domain. For that, you can edit your `/etc/hosts` and make app1.com, app2.com and app3.com all point to `127.0.0.1`.
18 |
19 | For that, open `/etc/hosts` and edits as follows:
20 |
21 | ````
22 | ##
23 | # Host Database
24 | #
25 | # localhost is used to configure the loopback interface
26 | # when the system is booting. Do not change this entry.
27 | ##
28 | 127.0.0.1 localhost
29 | 255.255.255.255 broadcasthost
30 | ::1 localhost
31 | # ...
32 | 127.0.0.1 app1.com
33 | 127.0.0.1 app2.com
34 | 127.0.0.1 app3.com
35 | ````
36 |
37 | Once that's done, just run all 3 applications (See specific instructions on each README) and go to [`app1.com:3000`](http://app1.com:3000) to start using the applications :).
38 |
39 | ## Learning
40 |
41 | To learn more about how this 3 apps work with SSO, please read the [SSO article](https://docs.auth0.com/sso/single-sign-on) from our docs.
42 |
--------------------------------------------------------------------------------
/public_html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |