8 | Logging you in...
9 |
Feel free to close this window if it doesn't go away automatically.
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/vanilla/redirect.js:
--------------------------------------------------------------------------------
1 | const auth = new OAuth2PopupFlow.OAuth2PopupFlow({
2 | authorizationUri: 'https://formandfocus.auth0.com/authorize',
3 | clientId: 'v90UOqUtmib6bTNIm3zHuYboekqoAXwN',
4 | redirectUri: 'http://localhost:8080/redirect',
5 | scope: 'openid profile',
6 | responseType: 'id_token',
7 | accessTokenResponseKey: 'id_token',
8 | });
9 |
10 | auth.handleRedirect();
--------------------------------------------------------------------------------
/examples/vanilla/styles.css:
--------------------------------------------------------------------------------
1 | * {
2 | font-family: sans-serif;
3 | color: peachpuff;
4 | }
5 |
6 | body {
7 | margin: 0;
8 | padding: 0;
9 | }
10 |
11 | .content {
12 | display: flex;
13 | flex-direction: column;
14 | justify-content: center;
15 | align-items: center;
16 | min-height: 100vh;
17 | min-width: 100vw;
18 |
19 | font-size: 2.618rem;
20 | font-weight: 500;
21 | background-color: palevioletred;
22 | }
23 |
24 | .sub {
25 | font-size: 1rem;
26 | margin: 1rem;
27 | }
28 |
29 | button {
30 | background-color: transparent;
31 | border: 0.1rem solid peachpuff;
32 | font-size: 1.618rem;
33 | padding: 1rem;
34 | margin: 1rem;
35 | outline: none;
36 | }
37 |
38 | button:hover {
39 | background-color: peachpuff;
40 | color: palevioletred;
41 | }
42 |
43 | button:active {
44 | background-color: papayawhip;
45 | }
46 |
--------------------------------------------------------------------------------
/license.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Rico Kahler
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 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "oauth2-popup-flow",
3 | "version": "1.1.0",
4 | "description": "A very simple oauth2 implicit flow library that uses window.open.",
5 | "main": "./index.js",
6 | "module": "./index.esm.js",
7 | "sideEffects": false,
8 | "scripts": {
9 | "test": "jest",
10 | "build": "rm -rf dist && tsc && rollup -c && cp package.json ./dist && cp readme.md ./dist",
11 | "docs": "rm -rf docs && typedoc --out ./docs ./src/index.ts"
12 | },
13 | "author": "Rico Kahler",
14 | "license": "MIT",
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/ricokahler/oauth2-popup-flow.git"
18 | },
19 | "devDependencies": {
20 | "@babel/preset-env": "^7.9.0",
21 | "@babel/preset-typescript": "^7.9.0",
22 | "@rollup/plugin-typescript": "^4.0.0",
23 | "@types/jest": "^26.0.3",
24 | "jest": "^26.1.0",
25 | "jsdom": "^16.2.2",
26 | "rollup": "^2.3.3",
27 | "tslib": "^2.0.0",
28 | "typedoc": "^0.17.4",
29 | "typescript": "^3.8.3"
30 | },
31 | "dependencies": {}
32 | }
33 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | ```
2 | ____ _ _ ___
3 | / __ \ /\ | | | | |__ \
4 | | | | | / \ _ _| |_| |__ ) |
5 | | | | |/ /\ \| | | | __| '_ \ / /
6 | | |__| / ____ \ |_| | |_| | | |/ /_
7 | \____/_/ \_\__,_|\__|_| |_|____|
8 |
9 | /$$$$$$$
10 | | $$__ $$
11 | | $$ \ $$ /$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$
12 | | $$$$$$$//$$__ $$ /$$__ $$| $$ | $$ /$$__ $$
13 | | $$____/| $$ \ $$| $$ \ $$| $$ | $$| $$ \ $$
14 | | $$ | $$ | $$| $$ | $$| $$ | $$| $$ | $$
15 | | $$ | $$$$$$/| $$$$$$$/| $$$$$$/| $$$$$$$/
16 | |__/ \______/ | $$____/ \______/ | $$____/
17 | | $$ | $$
18 | | $$ | $$ ______ _
19 | |__/ |__/ | ____| |
20 | | |__ | | _____ __
21 | | __| | |/ _ \ \ /\ / /
22 | | | | | (_) \ V V /
23 | |_| |_|\___/ \_/\_/
24 | ```
25 |
26 | [](https://codecov.io/gh/ricokahler/oauth2-popup-flow)
27 |
28 | ### A very simple oauth2 implicit grant flow library