├── .editorconfig
├── .github
├── ISSUE_TEMPLATE
│ ├── 1-bug-report.yml
│ ├── 2-feature-request.yml
│ └── 3-doc-issue.yml
└── workflows
│ ├── ci_demo-apps.yml
│ ├── ci_release.yml
│ ├── ci_test_auth-js.yml
│ ├── ci_test_auth-vue.yml
│ ├── ci_test_ngx-auth.yml
│ └── ci_website.yml
├── .gitignore
├── .husky
├── commit-msg
└── pre-commit
├── .prettierignore
├── .prettierrc
├── .vscode
├── extensions.json
└── settings.json
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DEVELOPER.md
├── LICENSE
├── README.md
├── apps
├── demo-app
│ ├── capacitor
│ │ ├── android
│ │ │ ├── .gitignore
│ │ │ ├── .idea
│ │ │ │ ├── .gitignore
│ │ │ │ ├── compiler.xml
│ │ │ │ ├── deploymentTargetDropDown.xml
│ │ │ │ ├── jarRepositories.xml
│ │ │ │ └── misc.xml
│ │ │ ├── app
│ │ │ │ ├── .gitignore
│ │ │ │ ├── build.gradle
│ │ │ │ ├── capacitor.build.gradle
│ │ │ │ ├── proguard-rules.pro
│ │ │ │ └── src
│ │ │ │ │ ├── androidTest
│ │ │ │ │ └── java
│ │ │ │ │ │ └── com
│ │ │ │ │ │ └── getcapacitor
│ │ │ │ │ │ └── myapp
│ │ │ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ │ │ ├── main
│ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ ├── assets
│ │ │ │ │ │ ├── capacitor.config.json
│ │ │ │ │ │ └── capacitor.plugins.json
│ │ │ │ │ ├── java
│ │ │ │ │ │ └── demoapp
│ │ │ │ │ │ │ └── authjs
│ │ │ │ │ │ │ └── MainActivity.java
│ │ │ │ │ └── res
│ │ │ │ │ │ ├── drawable-land-hdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── drawable-land-mdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── drawable-land-xhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── drawable-land-xxhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── drawable-land-xxxhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── drawable-port-hdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── drawable-port-mdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── drawable-port-xhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── drawable-port-xxhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── drawable-port-xxxhdpi
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── drawable-v24
│ │ │ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ │ │ ├── drawable
│ │ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ │ └── splash.png
│ │ │ │ │ │ ├── layout
│ │ │ │ │ │ └── activity_main.xml
│ │ │ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ │ ├── values
│ │ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ │ └── xml
│ │ │ │ │ │ ├── config.xml
│ │ │ │ │ │ └── file_paths.xml
│ │ │ │ │ └── test
│ │ │ │ │ └── java
│ │ │ │ │ └── com
│ │ │ │ │ └── getcapacitor
│ │ │ │ │ └── myapp
│ │ │ │ │ └── ExampleUnitTest.java
│ │ │ ├── build.gradle
│ │ │ ├── capacitor.settings.gradle
│ │ │ ├── gradle.properties
│ │ │ ├── gradle
│ │ │ │ └── wrapper
│ │ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ │ └── gradle-wrapper.properties
│ │ │ ├── gradlew
│ │ │ ├── gradlew.bat
│ │ │ ├── settings.gradle
│ │ │ └── variables.gradle
│ │ ├── capacitor.config.ts
│ │ ├── ios
│ │ │ ├── .gitignore
│ │ │ └── App
│ │ │ │ ├── App.xcodeproj
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace
│ │ │ │ │ └── contents.xcworkspacedata
│ │ │ │ ├── App.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── App
│ │ │ │ ├── AppDelegate.swift
│ │ │ │ ├── Assets.xcassets
│ │ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ │ ├── AppIcon-512@2x.png
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── Splash.imageset
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ ├── splash-2732x2732-1.png
│ │ │ │ │ │ ├── splash-2732x2732-2.png
│ │ │ │ │ │ └── splash-2732x2732.png
│ │ │ │ ├── Base.lproj
│ │ │ │ │ ├── LaunchScreen.storyboard
│ │ │ │ │ └── Main.storyboard
│ │ │ │ ├── Info.plist
│ │ │ │ ├── capacitor.config.json
│ │ │ │ └── config.xml
│ │ │ │ ├── Podfile
│ │ │ │ └── Podfile.lock
│ │ └── package.json
│ └── web
│ │ ├── auth-js
│ │ ├── .babelrc
│ │ ├── project.json
│ │ ├── src
│ │ │ ├── app
│ │ │ │ └── app.element.ts
│ │ │ ├── environments
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── favicon.ico
│ │ │ ├── index.html
│ │ │ ├── main.ts
│ │ │ └── styles.scss
│ │ ├── tsconfig.app.json
│ │ ├── tsconfig.json
│ │ └── webpack.config.js
│ │ ├── auth-vue
│ │ ├── index.html
│ │ ├── project.json
│ │ ├── public
│ │ │ └── favicon.ico
│ │ ├── src
│ │ │ ├── App.vue
│ │ │ ├── main.ts
│ │ │ ├── router
│ │ │ │ └── index.ts
│ │ │ ├── shims-vue.d.ts
│ │ │ ├── styles.scss
│ │ │ └── views
│ │ │ │ ├── DemoView.vue
│ │ │ │ └── PageView.vue
│ │ ├── tsconfig.app.json
│ │ ├── tsconfig.json
│ │ └── vite.config.mjs
│ │ ├── common
│ │ ├── components
│ │ │ ├── demo-app-debug.element.ts
│ │ │ ├── demo-app-header.element.ts
│ │ │ ├── demo-app-main.element.ts
│ │ │ ├── demo-app-playground.element.ts
│ │ │ └── demo-app-settings.element.ts
│ │ ├── core
│ │ │ └── index.ts
│ │ ├── index.ts
│ │ ├── jest.config.ts
│ │ ├── project.json
│ │ ├── settings
│ │ │ ├── default-settings.ts
│ │ │ ├── demo-app-settings.service.ts
│ │ │ ├── index.ts
│ │ │ └── library-settings-definition.ts
│ │ ├── tsconfig.json
│ │ ├── tsconfig.lib.json
│ │ └── tsconfig.spec.json
│ │ ├── ngx-auth
│ │ ├── .browserslistrc
│ │ ├── project.json
│ │ ├── public
│ │ │ └── favicon.ico
│ │ ├── src
│ │ │ ├── app
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.config.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.routes.ts
│ │ │ │ └── demo
│ │ │ │ │ ├── components
│ │ │ │ │ └── page
│ │ │ │ │ │ ├── page.component.html
│ │ │ │ │ │ ├── page.component.scss
│ │ │ │ │ │ └── page.component.ts
│ │ │ │ │ ├── demo.component.html
│ │ │ │ │ ├── demo.component.ts
│ │ │ │ │ └── demo.routes.ts
│ │ │ ├── index.html
│ │ │ ├── main.ts
│ │ │ └── styles.scss
│ │ ├── tsconfig.app.json
│ │ ├── tsconfig.editor.json
│ │ └── tsconfig.json
│ │ └── package.json
├── demo-e2e
│ ├── package.json
│ ├── src
│ │ ├── pageobjects
│ │ │ ├── demo.page.ts
│ │ │ ├── idp-page.model.ts
│ │ │ └── keycloak.page.ts
│ │ ├── polyfills
│ │ │ └── puppeteer.ts
│ │ └── specs
│ │ │ └── oidc
│ │ │ └── redirect.e2e.ts
│ ├── tsconfig.json
│ └── wdio.config.ts
├── demo-idp
│ ├── demo-realm.json
│ ├── docker-compose.yml
│ ├── export-demo-realm.sh
│ └── package.json
└── website
│ ├── .gitignore
│ ├── docs
│ ├── api
│ │ ├── angular
│ │ │ ├── auth-guard.md
│ │ │ ├── auth-interceptor.md
│ │ │ └── auth-service.md
│ │ ├── mobile.md
│ │ └── vanilla-js
│ │ │ └── auth-manager.md
│ ├── getting-started
│ │ ├── angular.mdx
│ │ ├── configuration.mdx
│ │ ├── intro.md
│ │ ├── mobile.mdx
│ │ ├── playground.md
│ │ ├── providers.mdx
│ │ ├── usage.md
│ │ ├── vanilla-js.mdx
│ │ └── vue-js.mdx
│ └── guides
│ │ └── guides.md
│ ├── docusaurus.config.js
│ ├── package.json
│ ├── sidebars.js
│ ├── src
│ ├── components
│ │ ├── Features.tsx
│ │ ├── Frameworks.tsx
│ │ └── Intro.tsx
│ ├── css
│ │ ├── custom.css
│ │ ├── home.css
│ │ ├── not-found.css
│ │ └── search.css
│ ├── pages
│ │ └── index.tsx
│ └── theme
│ │ ├── Navbar
│ │ └── index.tsx
│ │ └── NotFound
│ │ └── Content.tsx
│ ├── static
│ ├── .nojekyll
│ └── assets
│ │ ├── favicon.ico
│ │ └── svg
│ │ ├── 404.svg
│ │ ├── angular.svg
│ │ ├── code.svg
│ │ ├── globe.svg
│ │ ├── hexagons.svg
│ │ ├── javascript.svg
│ │ ├── logo.svg
│ │ ├── puzzle.svg
│ │ ├── shield-check.svg
│ │ ├── shield.svg
│ │ ├── smartphone.svg
│ │ ├── thumbs-up.svg
│ │ └── vue-js.svg
│ └── tsconfig.json
├── eslint.config.mjs
├── jest.config.ts
├── jest.preset.js
├── libs
├── auth-js
│ ├── @types
│ │ └── mobile
│ │ │ └── index.d.ts
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── build.mjs
│ ├── core
│ │ ├── auth-logger.ts
│ │ ├── auth-manager.ts
│ │ ├── auth-subscriptions.ts
│ │ ├── auth-utils.ts
│ │ ├── index.spec.ts
│ │ ├── index.ts
│ │ ├── main.ts
│ │ └── models
│ │ │ ├── auth-guard-options.model.ts
│ │ │ ├── auth-guard-validator.model.ts
│ │ │ ├── auth-settings.model.ts
│ │ │ ├── auth-subscriber-options.model.ts
│ │ │ ├── auth-subscriber.model.ts
│ │ │ └── auth-subscription.model.ts
│ ├── index.ts
│ ├── jest.config.ts
│ ├── oidc
│ │ ├── assets
│ │ │ ├── popup_redirect.html
│ │ │ └── silent_redirect.html
│ │ ├── default-settings.ts
│ │ ├── index.ts
│ │ ├── main.ts
│ │ ├── mobile
│ │ │ ├── mobile-navigator.ts
│ │ │ ├── mobile-storage.ts
│ │ │ └── mobile-window.ts
│ │ ├── models
│ │ │ ├── access-token.model.ts
│ │ │ ├── args.model.ts
│ │ │ ├── default-settings.model.ts
│ │ │ ├── desktop-navigation.enum.ts
│ │ │ ├── id-token.model.ts
│ │ │ ├── inject-token-pattern.model.ts
│ │ │ ├── inject-token.model.ts
│ │ │ ├── mobile-window-params.model.ts
│ │ │ ├── oidc-auth-settings.model.ts
│ │ │ └── user-session.model.ts
│ │ ├── oidc-auth-guard.ts
│ │ ├── oidc-auth-interceptor.ts
│ │ ├── oidc-auth-manager.ts
│ │ ├── oidc-auth-service.ts
│ │ └── oidc-user-manager.ts
│ ├── package.json
│ ├── project.json
│ ├── tsconfig.json
│ ├── tsconfig.lib.json
│ └── tsconfig.spec.json
├── auth-vue
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── build.mjs
│ ├── core
│ │ ├── auth.guard.ts
│ │ ├── auth.provider.ts
│ │ ├── auth.service.ts
│ │ └── index.ts
│ ├── index.ts
│ ├── package.json
│ ├── project.json
│ ├── tsconfig.json
│ └── tsconfig.lib.json
└── ngx-auth
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── core
│ ├── auth.guard.ts
│ ├── auth.provider.ts
│ ├── auth.service.ts
│ └── index.ts
│ ├── image
│ ├── auth-image.component.ts
│ ├── index.ts
│ └── ng-package.json
│ ├── index.ts
│ ├── jest.config.ts
│ ├── ng-package.json
│ ├── package.json
│ ├── project.json
│ ├── schematics
│ ├── collection.json
│ ├── ng-add
│ │ ├── index.ts
│ │ ├── ng-add-options.ts
│ │ ├── ng-add.spec.ts
│ │ └── schema.json
│ ├── tsconfig.json
│ ├── tsconfig.lib.json
│ ├── tsconfig.spec.json
│ └── utils.ts
│ ├── test-setup.ts
│ ├── tsconfig.json
│ ├── tsconfig.lib.json
│ ├── tsconfig.lib.prod.json
│ └── tsconfig.spec.json
├── nx.json
├── package-lock.json
├── package.json
├── patches
└── nx+21.2.2.patch
├── scripts
├── build-lib.mjs
└── release.mjs
├── tsconfig.base.json
└── tsconfig.strict.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 4
8 | end_of_line = lf
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
12 | [*.ts]
13 | quote_type = single
14 |
15 | [*.md]
16 | max_line_length = off
17 | trim_trailing_whitespace = false
18 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/1-bug-report.yml:
--------------------------------------------------------------------------------
1 | name: 🐞 Bug report
2 | description: Report a bug in the library
3 | title: '[BUG]
'
4 | labels: [bug, needs triage]
5 |
6 | body:
7 | - type: checkboxes
8 | attributes:
9 | label: Is there an existing issue for this?
10 | description: |
11 | Please search open and closed issues before submitting a new one.
12 | Existing issues often contain information about workarounds, resolution or progress updates.
13 | options:
14 | - label: I have searched the existing issues
15 | required: true
16 |
17 | - type: input
18 | attributes:
19 | label: Library version
20 | description: Please make sure you have installed the latest version and verified it is still an issue.
21 | placeholder: latest
22 | validations:
23 | required: true
24 |
25 | - type: textarea
26 | attributes:
27 | label: Description
28 | description: A clear & concise description of what you're experiencing.
29 | validations:
30 | required: true
31 |
32 | - type: textarea
33 | attributes:
34 | label: Steps to reproduce
35 | description: |
36 | Issues that don't have enough info and can't be reproduced will be closed.
37 | Please provide the steps to reproduce the behavior and if applicable create a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example)
38 | in a [new repository](https://github.com/new), a [gist](https://gist.github.com) or a [live demo](https://stackblitz.com).
39 | validations:
40 | required: false
41 |
42 | - type: textarea
43 | attributes:
44 | label: Environment
45 | description: |
46 | examples:
47 | - **OS Name**: macOS Monterey (version 12.6.1)
48 | - **System Model Name**: MacBook Pro (16-inch, 2019)
49 | - **npm**: **`npm -v`**: 7.6.3
50 | - **Node.js**: **`node -v`**: 13.14.0
51 | value: |
52 | - **OS Name**:
53 | - **System Model Name**:
54 | - **npm**:
55 | - **Node.js**:
56 | validations:
57 | required: false
58 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/2-feature-request.yml:
--------------------------------------------------------------------------------
1 | name: 🚀 Feature request
2 | description: Suggest a feature for the library
3 | title: '[FEATURE] '
4 | labels: [enhancement, needs triage]
5 |
6 | body:
7 | - type: textarea
8 | attributes:
9 | label: Description
10 | description: A clear and concise description of the problem or missing capability.
11 | validations:
12 | required: true
13 |
14 | - type: textarea
15 | attributes:
16 | label: Proposed solution
17 | description: If you have a solution in mind, please describe it.
18 | validations:
19 | required: true
20 |
21 | - type: textarea
22 | attributes:
23 | label: Alternatives considered
24 | description: Have you considered any alternative solutions or workarounds?
25 | validations:
26 | required: false
27 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/3-doc-issue.yml:
--------------------------------------------------------------------------------
1 | name: 📚 Docs enhancement
2 | description: File an enhancement or report an issue in the library's documentation
3 | title: '[DOCS] '
4 | labels: [documentation, needs triage]
5 |
6 | body:
7 | - type: checkboxes
8 | attributes:
9 | label: Documentation can be submitted with pull requests
10 | options:
11 | - label: I know that I can edit the docs myself but prefer to file this issue instead
12 | required: true
13 |
14 | - type: input
15 | attributes:
16 | label: Docs URL
17 | description: The URL of the page you'd like to see an enhancement to or report a problem from.
18 | validations:
19 | required: false
20 |
21 | - type: textarea
22 | attributes:
23 | label: Description
24 | description: A clear and concise description of the enhancement or problem.
25 | validations:
26 | required: true
27 |
--------------------------------------------------------------------------------
/.github/workflows/ci_demo-apps.yml:
--------------------------------------------------------------------------------
1 | name: Deploy demo-apps
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches:
7 | - main
8 | tags-ignore:
9 | - '**'
10 | paths:
11 | - '.github/workflows/ci_demo-apps.yml'
12 | - 'apps/demo-app/**'
13 | - 'libs/**'
14 |
15 | env:
16 | HUSKY: 0
17 |
18 | concurrency:
19 | group: deploy-demo-apps-group-${{ github.ref }}
20 | cancel-in-progress: true
21 |
22 | jobs:
23 | ci_demo-apps:
24 | runs-on: ubuntu-latest
25 | steps:
26 | - name: Setup
27 | uses: badisi/actions/setup@v2
28 |
29 | - name: Build demo-app:auth-js
30 | working-directory: apps/demo-app/web
31 | env:
32 | BASE_URL: /${{ github.event.repository.name }}/demo-app/auth-js/
33 | run: npm run build:auth-js -- --base-href=${{ env.BASE_URL }} --deploy-url=${{ env.BASE_URL }}
34 |
35 | - name: Build demo-app:ngx-auth
36 | working-directory: apps/demo-app/web
37 | env:
38 | BASE_URL: /${{ github.event.repository.name }}/demo-app/ngx-auth/
39 | run: npm run build:ngx-auth -- --base-href=${{ env.BASE_URL }} --deploy-url=${{ env.BASE_URL }}
40 |
41 | - name: Build demo-app:auth-vue
42 | working-directory: apps/demo-app/web
43 | env:
44 | BASE_URL: /${{ github.event.repository.name }}/demo-app/auth-vue/
45 | run: npm run build:auth-vue
46 |
47 | - name: Deploy to GitHub Pages
48 | uses: peaceiris/actions-gh-pages@v4
49 | with:
50 | commit_message: 'deploy(demo-apps):'
51 | github_token: ${{ secrets.GITHUB_TOKEN }}
52 | publish_dir: ./dist/demo-app
53 | destination_dir: demo-app
54 |
--------------------------------------------------------------------------------
/.github/workflows/ci_release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 | run-name: Release ${{ inputs.package }}${{ inputs.dry-run && ' (dry-run)' || '' }}
3 |
4 | on:
5 | workflow_dispatch:
6 | inputs:
7 | package:
8 | description: Package
9 | required: true
10 | type: choice
11 | options:
12 | - -- all --
13 | - auth-js
14 | - ngx-auth
15 | - auth-vue
16 | dry-run:
17 | description: --dry-run
18 | type: boolean
19 | default: false
20 |
21 | env:
22 | HUSKY: 0
23 | FORCE_COLOR: 3
24 |
25 | jobs:
26 | ci_release:
27 | uses: badisi/actions/.github/workflows/action.yml@v2
28 | secrets:
29 | GIT_USER_NAME: ${{ github.actor }}
30 | GIT_USER_EMAIL: ${{ github.actor }}@users.noreply.github.com
31 | GH_TOKEN: ${{ secrets.AUTH_JS_GITHUB_TOKEN }}
32 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
33 | with:
34 | working-directory: ${{ (inputs.package == '-- all --') && '.' || format('libs/{0}', inputs.package) }}
35 | dry-run: ${{ inputs.dry-run }}
36 | lint: true
37 | test: true
38 | build: true
39 | release: true
40 |
--------------------------------------------------------------------------------
/.github/workflows/ci_test_auth-js.yml:
--------------------------------------------------------------------------------
1 | name: Test auth-js
2 |
3 | on:
4 | workflow_dispatch:
5 | repository_dispatch:
6 | types: [test_auth-js]
7 | push:
8 | branches:
9 | - '**'
10 | tags-ignore:
11 | - '**'
12 | paths:
13 | - '.github/workflows/ci_test_auth-js.yml'
14 | - 'libs/auth-js/**'
15 |
16 | env:
17 | HUSKY: 0
18 |
19 | concurrency:
20 | group: ci-test-auth-js-group-${{ github.ref }}
21 | cancel-in-progress: true
22 |
23 | jobs:
24 | ci_test_auth-js:
25 | uses: badisi/actions/.github/workflows/action.yml@v2
26 | with:
27 | working-directory: libs/auth-js
28 | runs-on: '["ubuntu-latest", "macos-latest", "windows-latest"]'
29 | node-versions: '[22]'
30 | lint: true
31 | test: true
32 |
33 | ci_test_deps:
34 | needs: ci_test_auth-js
35 | runs-on: 'ubuntu-latest'
36 | steps:
37 | - name: Test ngx-auth
38 | uses: peter-evans/repository-dispatch@v3
39 | with:
40 | event-type: test_ngx-auth
41 |
42 | - name: Test auth-vue
43 | uses: peter-evans/repository-dispatch@v3
44 | with:
45 | event-type: test_auth-vue
46 |
--------------------------------------------------------------------------------
/.github/workflows/ci_test_auth-vue.yml:
--------------------------------------------------------------------------------
1 | name: Test auth-vue
2 |
3 | on:
4 | workflow_dispatch:
5 | repository_dispatch:
6 | types: [test_auth-vue]
7 | push:
8 | branches:
9 | - '**'
10 | tags-ignore:
11 | - '**'
12 | paths:
13 | - '.github/workflows/ci_test_auth-vue.yml'
14 | - 'libs/auth-vue/**'
15 |
16 | env:
17 | HUSKY: 0
18 |
19 | concurrency:
20 | group: ci-test-auth-vue-group-${{ github.ref }}
21 | cancel-in-progress: true
22 |
23 | jobs:
24 | ci_test_auth-vue:
25 | uses: badisi/actions/.github/workflows/action.yml@v2
26 | with:
27 | working-directory: libs/auth-vue
28 | runs-on: '["ubuntu-latest", "macos-latest", "windows-latest"]'
29 | node-versions: '[22]'
30 | lint: true
31 | test: true
32 |
--------------------------------------------------------------------------------
/.github/workflows/ci_test_ngx-auth.yml:
--------------------------------------------------------------------------------
1 | name: Test ngx-auth
2 |
3 | on:
4 | workflow_dispatch:
5 | repository_dispatch:
6 | types: [test_ngx-auth]
7 | push:
8 | branches:
9 | - '**'
10 | tags-ignore:
11 | - '**'
12 | paths:
13 | - '.github/workflows/ci_test_ngx-auth.yml'
14 | - 'libs/ngx-auth/**'
15 |
16 | env:
17 | HUSKY: 0
18 |
19 | concurrency:
20 | group: ci-test-ngx-auth-group-${{ github.ref }}
21 | cancel-in-progress: true
22 |
23 | jobs:
24 | ci_test_ngx-auth:
25 | uses: badisi/actions/.github/workflows/action.yml@v2
26 | with:
27 | working-directory: libs/ngx-auth
28 | runs-on: '["ubuntu-latest", "macos-latest", "windows-latest"]'
29 | node-versions: '[22]'
30 | lint: true
31 | test: true
32 |
--------------------------------------------------------------------------------
/.github/workflows/ci_website.yml:
--------------------------------------------------------------------------------
1 | name: Deploy website
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches:
7 | - main
8 | tags-ignore:
9 | - '**'
10 | paths:
11 | - '.github/workflows/ci_website.yml'
12 | - 'apps/website/**'
13 |
14 | env:
15 | HUSKY: 0
16 |
17 | concurrency:
18 | group: deploy-site-group-${{ github.ref }}
19 | cancel-in-progress: true
20 |
21 | jobs:
22 | ci_site:
23 | runs-on: ubuntu-latest
24 | steps:
25 | - name: Setup
26 | uses: badisi/actions/setup@v2
27 |
28 | - name: Build website
29 | working-directory: apps/website
30 | run: npm run build
31 |
32 | #
33 | # We do not use "peaceiris/actions-gh-page" action here as it wipes out
34 | # the whole repo and we don't want to lose the demo-app folder.
35 | #
36 | - name: Deploy to GitHub Pages
37 | run: |
38 | export TMP_WORKDIR="${{ runner.temp }}/gh-pages"
39 | rm -rf "$TMP_WORKDIR"
40 | mkdir -p "$TMP_WORKDIR"
41 | cd "$TMP_WORKDIR"
42 | git clone --depth=1 --single-branch --branch gh-pages "${{ github.server_url }}/${{ github.repository }}.git" .
43 | find . -mindepth 1 ! -path './demo-app*' ! -path './.gitignore' ! -path './.git*' -exec rm -rf {} +
44 | cp -r "${{ github.workspace }}/dist/website"/. "$TMP_WORKDIR/"
45 | git add .
46 | git config user.name "${{ github.actor }}"
47 | git config user.email "${{ github.actor }}@users.noreply.github.com"
48 | git commit -m "deploy(website): ${{ github.sha }}" || echo "No changes to commit"
49 | git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git gh-pages
50 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | dist
5 | tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | yarn-error.log
34 | testem.log
35 | /typings
36 |
37 | # System Files
38 | .DS_Store
39 | Thumbs.db
40 |
41 | .nx/cache
42 | .nx/workspace-data
43 |
44 | .angular
45 |
46 | vite.config.*.timestamp*
47 | .cursor/rules/nx-rules.mdc
48 | .github/instructions/nx.instructions.md
49 |
--------------------------------------------------------------------------------
/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | printf "> Validating commit message... "
2 | npx --no -- commitlint --edit "$1"
3 | printf "OK\n"
4 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | printf "> Linting staged files... "
2 | npx --no -- lint-staged --quiet
3 | printf "OK\n"
4 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | .angular
2 | .git
3 | .nx
4 | .docusaurus
5 | node_modules
6 | dist
7 | capacitor
8 | package-lock.json
9 |
10 | **/*.mdx
11 | **/*.md
12 | **/*.ts
13 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/prettierrc.json",
3 | "plugins": [
4 | "prettier-plugin-multiline-arrays"
5 | ],
6 | "multilineArraysWrapThreshold": 1,
7 | "singleQuote": true,
8 | "bracketSameLine": true,
9 | "tabWidth": 4,
10 | "printWidth": 80,
11 | "endOfLine": "auto",
12 | "trailingComma": "none",
13 | "arrowParens": "avoid",
14 | "htmlWhitespaceSensitivity": "ignore",
15 | "proseWrap": "never"
16 | }
17 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "esbenp.prettier-vscode",
4 | "dbaeumer.vscode-eslint",
5 | "angular.ng-template",
6 | "sibiraj-s.vscode-scss-formatter",
7 | "pkief.material-icon-theme"
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.eol": "\n",
3 | "files.watcherExclude": {
4 | "**/dist/**": true,
5 | "**/tmp/**": true
6 | },
7 | "search.exclude": {
8 | "**/node_modules": true,
9 | "**/dist": true,
10 | "**/tmp": true
11 | },
12 | "workbench.iconTheme": "material-icon-theme",
13 | "material-icon-theme.folders.theme": "none",
14 | "material-icon-theme.opacity": 0.6,
15 | "[javascript]": {
16 | "editor.defaultFormatter": "esbenp.prettier-vscode"
17 | },
18 | "[typescript]": {
19 | "editor.defaultFormatter": "dbaeumer.vscode-eslint"
20 | },
21 | "[html]": {
22 | "editor.defaultFormatter": "esbenp.prettier-vscode"
23 | },
24 | "[scss]": {
25 | "editor.defaultFormatter": "esbenp.prettier-vscode"
26 | },
27 | "[css]": {
28 | "editor.defaultFormatter": "esbenp.prettier-vscode"
29 | },
30 | "[json]": {
31 | "editor.defaultFormatter": "esbenp.prettier-vscode"
32 | },
33 | "[jsonc]": {
34 | "editor.defaultFormatter": "esbenp.prettier-vscode"
35 | },
36 | "editor.codeActionsOnSave": {
37 | "source.fixAll.eslint": "explicit"
38 | },
39 | "editor.formatOnSave": true,
40 | "eslint.format.enable": true,
41 | "html.format.wrapAttributes": "force-aligned",
42 | "html.format.wrapLineLength": 120,
43 | "npm.exclude": "**/{dist,tmp}{,/**}",
44 | "npm.packageManager": "npm",
45 | "npm.scriptExplorerExclude": [
46 | "install",
47 | "prepare"
48 | ]
49 | }
50 |
--------------------------------------------------------------------------------
/DEVELOPER.md:
--------------------------------------------------------------------------------
1 | # Development
2 |
3 | This document describes how you can test, build and publish the library.
4 |
5 | ## Prerequisite
6 |
7 | Before you can build and test this library you must install and configure the following products on your development machine:
8 |
9 | * [Node.js][nodejs]
10 | * [Git][git]
11 |
12 | You will then need to install the library required dependencies:
13 |
14 | ```sh
15 | cd
16 | npm install
17 | ```
18 |
19 | ## Testing locally
20 |
21 | You can test the library while developing it, as follow:
22 |
23 | 1. Start the testing application
24 |
25 | ```sh
26 | npm start
27 | ```
28 |
29 | 2. Make any modifications
30 |
31 | * to the **library**: in `libs/library/src/`
32 | * to the **testing application**: in `libs/tests-app/src/`
33 | * to the **tests**: in `libs/tests/harness.e2e.ts`
34 |
35 | 3. Run the test
36 |
37 | ```sh
38 | npm run test
39 | ```
40 |
41 | ## Building the library
42 |
43 | The library will be built in the `./dist` directory.
44 |
45 | ```sh
46 | npm run build:lib
47 | ```
48 |
49 | ## Publishing to NPM repository
50 |
51 | This project comes with automatic continuous delivery (CD) using *GitHub Actions*.
52 |
53 | 1. Bump the library version in `./package.json`
54 | 2. Push the changes
55 | 3. Create a new: [GitHub release](https://github.com/badisi/auth-js/releases/new)
56 | 4. Watch the results in: [Actions](https://github.com/badisi/auth-js/actions)
57 |
58 |
59 |
60 | [git]: https://git-scm.com/
61 | [nodejs]: https://nodejs.org/
62 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/.gitignore:
--------------------------------------------------------------------------------
1 | # Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
2 |
3 | # Built application files
4 | *.apk
5 | *.aar
6 | *.ap_
7 | *.aab
8 |
9 | # Files for the ART/Dalvik VM
10 | *.dex
11 |
12 | # Java class files
13 | *.class
14 |
15 | # Generated files
16 | bin/
17 | gen/
18 | out/
19 | # Uncomment the following line in case you need and you don't have the release build type files in your app
20 | # release/
21 |
22 | # Gradle files
23 | .gradle/
24 | build/
25 |
26 | # Local configuration file (sdk path, etc)
27 | local.properties
28 |
29 | # Proguard folder generated by Eclipse
30 | proguard/
31 |
32 | # Log Files
33 | *.log
34 |
35 | # Android Studio Navigation editor temp files
36 | .navigation/
37 |
38 | # Android Studio captures folder
39 | captures/
40 |
41 | # IntelliJ
42 | *.iml
43 | .idea/workspace.xml
44 | .idea/tasks.xml
45 | .idea/gradle.xml
46 | .idea/assetWizardSettings.xml
47 | .idea/dictionaries
48 | .idea/libraries
49 | # Android Studio 3 in .gitignore file.
50 | .idea/caches
51 | .idea/modules.xml
52 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you
53 | .idea/navEditor.xml
54 |
55 | # Keystore files
56 | # Uncomment the following lines if you do not want to check your keystore files in.
57 | #*.jks
58 | #*.keystore
59 |
60 | # External native build folder generated in Android Studio 2.2 and later
61 | .externalNativeBuild
62 | .cxx/
63 |
64 | # Google Services (e.g. APIs or Firebase)
65 | # google-services.json
66 |
67 | # Freeline
68 | freeline.py
69 | freeline/
70 | freeline_project_description.json
71 |
72 | # fastlane
73 | fastlane/report.xml
74 | fastlane/Preview.html
75 | fastlane/screenshots
76 | fastlane/test_output
77 | fastlane/readme.md
78 |
79 | # Version control
80 | vcs.xml
81 |
82 | # lint
83 | lint/intermediates/
84 | lint/generated/
85 | lint/outputs/
86 | lint/tmp/
87 | # lint/reports/
88 |
89 | # Android Profiling
90 | *.hprof
91 |
92 | # Cordova plugins for Capacitor
93 | capacitor-cordova-android-plugins
94 |
95 | # Copied web assets
96 | app/src/main/assets/public
97 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/.idea/deploymentTargetDropDown.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build/*
2 | !/build/.npmkeep
3 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | namespace "demoapp.authjs"
5 | compileSdkVersion rootProject.ext.compileSdkVersion
6 | defaultConfig {
7 | applicationId "demoapp.authjs"
8 | minSdkVersion rootProject.ext.minSdkVersion
9 | targetSdkVersion rootProject.ext.targetSdkVersion
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13 | aaptOptions {
14 | // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
15 | // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
16 | ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
17 | }
18 | }
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | }
26 |
27 | repositories {
28 | flatDir{
29 | dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
30 | }
31 | }
32 |
33 | dependencies {
34 | implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
35 | implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
36 | implementation fileTree(include: ['*.jar'], dir: 'libs')
37 | implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
38 | implementation project(':capacitor-android')
39 | testImplementation "junit:junit:$junitVersion"
40 | androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
41 | androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
42 | implementation project(':capacitor-cordova-android-plugins')
43 | }
44 |
45 | apply from: 'capacitor.build.gradle'
46 |
47 | try {
48 | def servicesJSON = file('google-services.json')
49 | if (servicesJSON.text) {
50 | apply plugin: 'com.google.gms.google-services'
51 | }
52 | } catch(Exception e) {
53 | logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
54 | }
55 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/capacitor.build.gradle:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2 |
3 | android {
4 | compileOptions {
5 | sourceCompatibility JavaVersion.VERSION_17
6 | targetCompatibility JavaVersion.VERSION_17
7 | }
8 | }
9 |
10 | apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
11 | dependencies {
12 | implementation project(':capacitor-app')
13 | implementation project(':capacitor-browser')
14 | implementation project(':capacitor-preferences')
15 | implementation project(':capacitor-secure-storage-plugin')
16 |
17 | }
18 |
19 |
20 | if (hasProperty('postBuildExtras')) {
21 | postBuildExtras()
22 | }
23 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.getcapacitor.myapp;
2 |
3 | import static org.junit.Assert.*;
4 |
5 | import android.content.Context;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 | import androidx.test.platform.app.InstrumentationRegistry;
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * @see Testing documentation
15 | */
16 | @RunWith(AndroidJUnit4.class)
17 | public class ExampleInstrumentedTest {
18 |
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
23 |
24 | assertEquals("com.getcapacitor.app", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
39 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/assets/capacitor.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "appId": "demoapp",
3 | "appName": "demo-app",
4 | "loggingBehavior": "debug",
5 | "server": {
6 | "url": "http://10.0.2.2:4200",
7 | "cleartext": true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/assets/capacitor.plugins.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "pkg": "@capacitor/app",
4 | "classpath": "com.capacitorjs.plugins.app.AppPlugin"
5 | },
6 | {
7 | "pkg": "@capacitor/browser",
8 | "classpath": "com.capacitorjs.plugins.browser.BrowserPlugin"
9 | },
10 | {
11 | "pkg": "@capacitor/preferences",
12 | "classpath": "com.capacitorjs.plugins.preferences.PreferencesPlugin"
13 | },
14 | {
15 | "pkg": "capacitor-secure-storage-plugin",
16 | "classpath": "com.whitestein.securestorage.SecureStoragePluginPlugin"
17 | }
18 | ]
19 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/java/demoapp/authjs/MainActivity.java:
--------------------------------------------------------------------------------
1 | package demoapp.authjs;
2 |
3 | import com.getcapacitor.BridgeActivity;
4 |
5 | public class MainActivity extends BridgeActivity {}
6 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-land-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable-land-hdpi/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-land-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable-land-mdpi/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-land-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable-land-xhdpi/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-land-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable-land-xxhdpi/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-land-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable-land-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-port-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable-port-hdpi/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-port-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable-port-mdpi/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-port-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable-port-xhdpi/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-port-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable-port-xxhdpi/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-port-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable-port-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/drawable/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/drawable/splash.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | demo-app-auth-js
4 | demo-app-auth-js
5 | demoapp.authjs
6 | demoapp.authjs
7 |
8 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
18 |
19 |
22 |
23 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/xml/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.getcapacitor.myapp;
2 |
3 | import static org.junit.Assert.*;
4 |
5 | import org.junit.Test;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 |
14 | @Test
15 | public void addition_isCorrect() throws Exception {
16 | assertEquals(4, 2 + 2);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | mavenCentral()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:8.0.0'
11 | classpath 'com.google.gms:google-services:4.3.15'
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | apply from: "variables.gradle"
19 |
20 | allprojects {
21 | repositories {
22 | google()
23 | mavenCentral()
24 | }
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/capacitor.settings.gradle:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2 | include ':capacitor-android'
3 | project(':capacitor-android').projectDir = new File('../../../../node_modules/@capacitor/android/capacitor')
4 |
5 | include ':capacitor-app'
6 | project(':capacitor-app').projectDir = new File('../../../../node_modules/@capacitor/app/android')
7 |
8 | include ':capacitor-browser'
9 | project(':capacitor-browser').projectDir = new File('../../../../node_modules/@capacitor/browser/android')
10 |
11 | include ':capacitor-preferences'
12 | project(':capacitor-preferences').projectDir = new File('../../../../node_modules/@capacitor/preferences/android')
13 |
14 | include ':capacitor-secure-storage-plugin'
15 | project(':capacitor-secure-storage-plugin').projectDir = new File('../../../../node_modules/capacitor-secure-storage-plugin/android')
16 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
19 | # AndroidX package structure to make it clearer which packages are bundled with the
20 | # Android operating system, and which are packaged with your app's APK
21 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
22 | android.useAndroidX=true
23 |
24 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | include ':capacitor-cordova-android-plugins'
3 | project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')
4 |
5 | apply from: 'capacitor.settings.gradle'
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/android/variables.gradle:
--------------------------------------------------------------------------------
1 | ext {
2 | minSdkVersion = 22
3 | compileSdkVersion = 33
4 | targetSdkVersion = 33
5 | androidxActivityVersion = '1.7.0'
6 | androidxAppCompatVersion = '1.6.1'
7 | androidxCoordinatorLayoutVersion = '1.2.0'
8 | androidxCoreVersion = '1.10.0'
9 | androidxFragmentVersion = '1.5.6'
10 | junitVersion = '4.13.2'
11 | androidxJunitVersion = '1.1.5'
12 | androidxEspressoCoreVersion = '3.5.1'
13 | cordovaAndroidVersion = '10.1.1'
14 | coreSplashScreenVersion = '1.0.0'
15 | androidxWebkitVersion = '1.6.1'
16 | }
17 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/capacitor.config.ts:
--------------------------------------------------------------------------------
1 | import { CapacitorConfig } from '@capacitor/cli';
2 |
3 | const config: CapacitorConfig = {
4 | appId: 'demoapp',
5 | appName: 'demo-app',
6 | loggingBehavior: 'debug'
7 | };
8 |
9 | // eslint-disable-next-line no-loops/no-loops
10 | for (let i = 0; i < process.argv.length; i++) {
11 | if (process.argv[i] === '--serverUrl') {
12 | config.server = {
13 | url: process.argv[++i],
14 | cleartext: true // Needed for Android, to avoid error ERR_CLEARTEXT_NOT_PERMITTED
15 | };
16 | }
17 | }
18 |
19 | export default config;
20 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/.gitignore:
--------------------------------------------------------------------------------
1 | App/build
2 | App/Pods
3 | App/App/public
4 | App/output
5 | DerivedData
6 | xcuserdata
7 |
8 | # Cordova plugins for Capacitor
9 | capacitor-cordova-ios-plugins
10 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "AppIcon-512@2x.png",
5 | "idiom" : "universal",
6 | "platform" : "ios",
7 | "size" : "1024x1024"
8 | }
9 | ],
10 | "info" : {
11 | "author" : "xcode",
12 | "version" : 1
13 | }
14 | }
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "splash-2732x2732-2.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "splash-2732x2732-1.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "splash-2732x2732.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | demo-app-auth-js
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleURLTypes
22 |
23 |
24 | CFBundleTypeRole
25 | Editor
26 | CFBundleURLName
27 | demoapp.authjs
28 | CFBundleURLSchemes
29 |
30 | demo-app
31 |
32 |
33 |
34 | CFBundleVersion
35 | 1
36 | LSRequiresIPhoneOS
37 |
38 | UILaunchStoryboardName
39 | LaunchScreen
40 | UIMainStoryboardFile
41 | Main
42 | UIRequiredDeviceCapabilities
43 |
44 | armv7
45 |
46 | UISupportedInterfaceOrientations
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationLandscapeLeft
50 | UIInterfaceOrientationLandscapeRight
51 |
52 | UISupportedInterfaceOrientations~ipad
53 |
54 | UIInterfaceOrientationPortrait
55 | UIInterfaceOrientationPortraitUpsideDown
56 | UIInterfaceOrientationLandscapeLeft
57 | UIInterfaceOrientationLandscapeRight
58 |
59 | UIViewControllerBasedStatusBarAppearance
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/capacitor.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "appId": "demoapp",
3 | "appName": "demo-app",
4 | "loggingBehavior": "debug",
5 | "server": {
6 | "url": "http://localhost:4200",
7 | "cleartext": true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/App/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../../../../../node_modules/@capacitor/ios/scripts/pods_helpers'
2 |
3 | platform :ios, '13.0'
4 | use_frameworks!
5 |
6 | # Workaround to avoid Xcode caching of Pods that requires
7 | # Product -> Clean Build Folder after new Cordova plugins installed
8 | # Requires CocoaPods 1.6 or newer
9 | install! 'cocoapods', :disable_input_output_paths => true
10 |
11 | def capacitor_pods
12 | pod 'Capacitor', :path => '../../../../../node_modules/@capacitor/ios'
13 | pod 'CapacitorCordova', :path => '../../../../../node_modules/@capacitor/ios'
14 | pod 'CapacitorApp', :path => '../../../../../node_modules/@capacitor/app'
15 | pod 'CapacitorBrowser', :path => '../../../../../node_modules/@capacitor/browser'
16 | pod 'CapacitorPreferences', :path => '../../../../../node_modules/@capacitor/preferences'
17 | pod 'CapacitorSecureStoragePlugin', :path => '../../../../../node_modules/capacitor-secure-storage-plugin'
18 | end
19 |
20 | target 'App' do
21 | capacitor_pods
22 | # Add your Pods here
23 | end
24 |
25 |
26 | post_install do |installer|
27 | assertDeploymentTarget(installer)
28 | end
29 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/ios/App/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Capacitor (5.7.8):
3 | - CapacitorCordova
4 | - CapacitorApp (5.0.8):
5 | - Capacitor
6 | - CapacitorBrowser (5.2.1):
7 | - Capacitor
8 | - CapacitorCordova (5.7.8)
9 | - CapacitorPreferences (5.0.8):
10 | - Capacitor
11 | - CapacitorSecureStoragePlugin (0.9.0):
12 | - Capacitor
13 | - SwiftKeychainWrapper
14 | - SwiftKeychainWrapper (4.0.1)
15 |
16 | DEPENDENCIES:
17 | - "Capacitor (from `../../../../../node_modules/@capacitor/ios`)"
18 | - "CapacitorApp (from `../../../../../node_modules/@capacitor/app`)"
19 | - "CapacitorBrowser (from `../../../../../node_modules/@capacitor/browser`)"
20 | - "CapacitorCordova (from `../../../../../node_modules/@capacitor/ios`)"
21 | - "CapacitorPreferences (from `../../../../../node_modules/@capacitor/preferences`)"
22 | - CapacitorSecureStoragePlugin (from `../../../../../node_modules/capacitor-secure-storage-plugin`)
23 |
24 | SPEC REPOS:
25 | trunk:
26 | - SwiftKeychainWrapper
27 |
28 | EXTERNAL SOURCES:
29 | Capacitor:
30 | :path: "../../../../../node_modules/@capacitor/ios"
31 | CapacitorApp:
32 | :path: "../../../../../node_modules/@capacitor/app"
33 | CapacitorBrowser:
34 | :path: "../../../../../node_modules/@capacitor/browser"
35 | CapacitorCordova:
36 | :path: "../../../../../node_modules/@capacitor/ios"
37 | CapacitorPreferences:
38 | :path: "../../../../../node_modules/@capacitor/preferences"
39 | CapacitorSecureStoragePlugin:
40 | :path: "../../../../../node_modules/capacitor-secure-storage-plugin"
41 |
42 | SPEC CHECKSUMS:
43 | Capacitor: 747aadb4fa786f460d8cd9d0557cb81440a13747
44 | CapacitorApp: 102e553c3b1fdc255969c39aa19b529675690ef4
45 | CapacitorBrowser: bac3132be6506411704149f9f2099843ffe470a0
46 | CapacitorCordova: 31ab98dca2ddcee051027a1afe7e8c85c82f7297
47 | CapacitorPreferences: 9e59596c5fd9915ed45279d1fda68978c5706401
48 | CapacitorSecureStoragePlugin: e91d7df060f2495a1acff9583641a6953e3aacba
49 | SwiftKeychainWrapper: 807ba1d63c33a7d0613288512399cd1eda1e470c
50 |
51 | PODFILE CHECKSUM: 30cc9ca62b326a988b41e9cd758c90bb8e2943c3
52 |
53 | COCOAPODS: 1.11.2
54 |
--------------------------------------------------------------------------------
/apps/demo-app/capacitor/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo-app-capacitor",
3 | "private": true,
4 | "license": "GPL-3.0-only",
5 | "scripts": {
6 | "start:ios:localhost": "npx cap run ios --serverUrl http://localhost:4200",
7 | "start:ios:demo-auth-js": "npx cap run ios --serverUrl https://badisi.github.io/auth-js/demo-app/auth-js",
8 | "start:ios:demo-auth-vue": "npx cap run ios --serverUrl https://badisi.github.io/auth-js/demo-app/auth-vue",
9 | "start:ios:demo-ngx-auth": "npx cap run ios --serverUrl https://badisi.github.io/auth-js/demo-app/ngx-auth",
10 | "start:android:localhost": "npx cap run android --serverUrl http://10.0.2.2:4200",
11 | "start:android:demo-auth-js": "npx cap run android --serverUrl https://badisi.github.io/auth-js/demo-app/auth-js",
12 | "start:android:demo-auth-vue": "npx cap run android --serverUrl https://badisi.github.io/auth-js/demo-app/auth-vue",
13 | "start:android:demo-ngx-auth": "npx cap run android --serverUrl https://badisi.github.io/auth-js/demo-app/ngx-auth"
14 | },
15 | "dependencies": {
16 | "@capacitor/android": "^5.7.4",
17 | "@capacitor/app": "^5.0.7",
18 | "@capacitor/browser": "^5.2.0",
19 | "@capacitor/core": "^5.7.4",
20 | "@capacitor/ios": "^5.7.4",
21 | "@capacitor/preferences": "^5.0.7",
22 | "capacitor-secure-storage-plugin": "^0.9.0"
23 | },
24 | "devDependencies": {
25 | "@capacitor/cli": "^5.7.4"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-js/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@nx/js/babel"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-js/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | name: 'PROD',
3 | production: true
4 | };
5 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-js/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // When building for production, this file is replaced with `environment.prod.ts`.
3 |
4 | export const environment = {
5 | name: 'DEV',
6 | production: false
7 | };
8 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-js/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/web/auth-js/src/favicon.ico
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-js/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Playground | Auth-js
6 |
7 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-js/src/main.ts:
--------------------------------------------------------------------------------
1 | import './app/app.element';
2 |
3 | import { initOidc } from '@badisi/auth-js/oidc';
4 | import { DemoAppSettingsService } from 'demo-app-common';
5 |
6 | import { environment } from './environments/environment';
7 |
8 | ((): void => {
9 | window.appSettings = new DemoAppSettingsService(!environment.production);
10 |
11 | const el = document.createElement('div');
12 | el.innerHTML = 'Loading...';
13 | document.body.appendChild(el);
14 |
15 | initOidc(window.appSettings.getCurrentSettings().librarySettings)
16 | .then(manager => {
17 | window.authManager = manager;
18 | el.replaceWith(document.createElement('app-root'));
19 | })
20 | .catch((err: unknown) => {
21 | const message = (err instanceof Error) ? err.message : String(err);
22 | el.innerHTML = `${message}
`;
23 | document.body.querySelector('#loginButton')?.addEventListener(
24 | 'click', () => { location.reload(); }, { once: true }
25 | );
26 | console.error(err);
27 | });
28 | })();
29 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-js/src/styles.scss:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
3 | html,
4 | body {
5 | height: 100%;
6 | }
7 |
8 | body {
9 | margin: var(--safe-area-inset-top) 0 var(--safe-area-inset-bottom) 0;
10 | font-family:
11 | system-ui,
12 | -apple-system,
13 | 'Inter',
14 | sans-serif;
15 | background-color: #fafafa;
16 | }
17 |
18 | :root {
19 | /* iOS Safari 11.2, Safari 11 */
20 | @supports (top: constant(safe-area-inset-top)) {
21 | --safe-area-inset-top: constant(safe-area-inset-top);
22 | --safe-area-inset-bottom: constant(safe-area-inset-bottom);
23 | }
24 |
25 | /* iOS Safari 11.4+, Safari 11.1+, Chrome 69+, Opera 56+ */
26 | @supports (top: env(safe-area-inset-top)) {
27 | --safe-area-inset-top: env(safe-area-inset-top);
28 | --safe-area-inset-bottom: env(safe-area-inset-bottom);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-js/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../../../dist/out-tsc",
5 | "types": [
6 | "../../../../libs/auth-js/@types/mobile"
7 | ]
8 | },
9 | "include": [
10 | "src/**/*.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-js/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "esModuleInterop": true,
5 | "forceConsistentCasingInFileNames": true,
6 | "strict": true,
7 | "noImplicitOverride": true,
8 | "noPropertyAccessFromIndexSignature": true,
9 | "noImplicitReturns": true,
10 | "noFallthroughCasesInSwitch": true,
11 | "resolveJsonModule": true
12 | },
13 | "files": [],
14 | "include": [],
15 | "references": [
16 | {
17 | "path": "./tsconfig.app.json"
18 | }
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-js/webpack.config.js:
--------------------------------------------------------------------------------
1 | const { composePlugins, withNx, withWeb } = require('@nx/webpack');
2 | const { resolve } = require('node:path');
3 |
4 | // Note: This was added by an Nx migration. Webpack builds are required to have a corresponding Webpack config file.
5 | // See: https://nx.dev/recipes/webpack/webpack-config-setup
6 | module.exports = composePlugins(withNx(), withWeb(), config => {
7 | const babelLoader = (config.module.rules ?? []).find(rule => rule.loader && rule.loader.includes('babel-loader'));
8 | if (babelLoader) {
9 | babelLoader.options.cacheDirectory = resolve(__dirname, '../../../../node_modules/.cache/babel-loader');
10 | }
11 | return config;
12 | });
13 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-vue/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Playground | Auth-vue
6 |
7 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-vue/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo-app-auth-vue",
3 | "$schema": "../../../../node_modules/nx/schemas/project-schema.json",
4 | "projectType": "application",
5 | "sourceRoot": "apps/demo-app/web/auth-vue/src",
6 | "tags": [],
7 | "targets": {
8 | "build": {
9 | "executor": "@nx/vite:build",
10 | "outputs": [
11 | "{options.outputPath}"
12 | ],
13 | "options": {
14 | "outputPath": "dist/demo-app/auth-vue",
15 | "tsConfig": "apps/demo-app/web/auth-vue/tsconfig.app.json",
16 | "configFile": "apps/demo-app/web/auth-vue/vite.config.mjs"
17 | }
18 | },
19 | "serve": {
20 | "executor": "@nx/vite:dev-server",
21 | "options": {
22 | "host": "0.0.0.0",
23 | "buildTarget": "demo-app-auth-vue:build"
24 | }
25 | },
26 | "lint": {
27 | "executor": "@nx/eslint:lint"
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-vue/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Badisi/auth-js/24107615ff7481a57b992ba0de162036ca1d655a/apps/demo-app/web/auth-vue/public/favicon.ico
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-vue/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-vue/src/main.ts:
--------------------------------------------------------------------------------
1 | import './styles.scss';
2 |
3 | import { initAuth } from '@badisi/auth-vue';
4 | import { DemoAppSettingsService } from 'demo-app-common';
5 | import { createApp } from 'vue';
6 |
7 | import app from './App.vue';
8 | import router from './router';
9 |
10 | ((): void => {
11 | window.appSettings = new DemoAppSettingsService(!import.meta.env.PROD);
12 |
13 | const el = document.createElement('div');
14 | el.innerHTML = 'Loading...';
15 | document.body.appendChild(el);
16 |
17 | initAuth(window.appSettings.getCurrentSettings().librarySettings)
18 | .then(authPlugin => {
19 | el.replaceWith(document.createElement('root'));
20 |
21 | const vueApp = createApp(app);
22 | vueApp.use(authPlugin, { router });
23 | vueApp.use(router);
24 | vueApp.mount('root');
25 | })
26 | .catch((err: unknown) => {
27 | const message = (err instanceof Error) ? err.message : String(err);
28 | el.innerHTML = `${message}
`;
29 | document.body.querySelector('#loginButton')?.addEventListener(
30 | 'click', () => { location.reload(); }, { once: true }
31 | );
32 | console.error(err);
33 | });
34 | })();
35 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-vue/src/router/index.ts:
--------------------------------------------------------------------------------
1 | import { rolesValidator } from 'demo-app-common';
2 | import { createRouter, createWebHistory, type RouteComponent } from 'vue-router';
3 |
4 | import demoView from '../views/DemoView.vue';
5 |
6 | const router = createRouter({
7 | history: createWebHistory(import.meta.env.BASE_URL),
8 | routes: [
9 | {
10 | path: '/',
11 | component: demoView,
12 | children: [
13 | {
14 | path: 'forbidden',
15 | component: (): Promise => import('../views/PageView.vue'),
16 | meta: {
17 | title: 'ACCESS FORBIDDEN'
18 | }
19 | },
20 | {
21 | path: 'public',
22 | component: (): Promise => import('../views/PageView.vue'),
23 | meta: {
24 | title: 'PUBLIC CONTENT'
25 | }
26 | },
27 | {
28 | path: 'private',
29 | component: (): Promise => import('../views/PageView.vue'),
30 | meta: {
31 | title: 'PRIVATE CONTENT',
32 | authGuard: true,
33 | // authGuard: { fallbackUrl: 'forbidden' },
34 | // authGuard: { validator: () => false },
35 | // authGuard: { validator: hasRole('view-profile') }
36 | }
37 | },
38 | {
39 | path: 'protected',
40 | component: (): Promise => import('../views/PageView.vue'),
41 | meta: {
42 | title: 'PROTECTED CONTENT',
43 | authGuard: {
44 | validator: rolesValidator()
45 | }
46 | }
47 | }
48 | ]
49 | }
50 | ]
51 | });
52 |
53 | export default router;
54 |
--------------------------------------------------------------------------------
/apps/demo-app/web/auth-vue/src/shims-vue.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.vue' {
2 | import type { DefineComponent } from 'vue';
3 | const component: DefineComponent