├── .github
├── issue_template.md
└── pull_request_template.md
├── .gitignore
├── .npmignore
├── .travis.yml
├── LICENSE
├── README.md
├── demo-angular
├── .editorconfig
├── .gitignore
├── App_Resources
│ ├── Android
│ │ ├── app.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── drawable-ldpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── drawable-nodpi
│ │ │ └── splash_screen.xml
│ │ │ ├── drawable-xhdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── values-v21
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ └── iOS
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── icon-1024.png
│ │ │ ├── icon-20.png
│ │ │ ├── icon-20@2x.png
│ │ │ ├── icon-20@3x.png
│ │ │ ├── icon-29.png
│ │ │ ├── icon-29@2x.png
│ │ │ ├── icon-29@3x.png
│ │ │ ├── icon-40.png
│ │ │ ├── icon-40@2x.png
│ │ │ ├── icon-40@3x.png
│ │ │ ├── icon-60@2x.png
│ │ │ ├── icon-60@3x.png
│ │ │ ├── icon-76.png
│ │ │ ├── icon-76@2x.png
│ │ │ └── icon-83.5@2x.png
│ │ ├── Contents.json
│ │ ├── LaunchImage.launchimage
│ │ │ ├── Contents.json
│ │ │ ├── Default-1125h.png
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── Default-667h@2x.png
│ │ │ ├── Default-736h@3x.png
│ │ │ ├── Default-Landscape-X.png
│ │ │ ├── Default-Landscape-XR.png
│ │ │ ├── Default-Landscape-XS-Max.png
│ │ │ ├── Default-Landscape.png
│ │ │ ├── Default-Landscape@2x.png
│ │ │ ├── Default-Landscape@3x.png
│ │ │ ├── Default-Portrait-XR.png
│ │ │ ├── Default-Portrait-XS-Max.png
│ │ │ ├── Default-Portrait.png
│ │ │ ├── Default-Portrait@2x.png
│ │ │ ├── Default.png
│ │ │ └── Default@2x.png
│ │ ├── LaunchScreen.AspectFill.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ ├── LaunchScreen-AspectFill@2x.png
│ │ │ └── LaunchScreen.AspectFill@3x.png
│ │ └── LaunchScreen.Center.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchScreen-Center.png
│ │ │ ├── LaunchScreen-Center@2x.png
│ │ │ └── LaunchScreen.Center@3x.png
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ └── build.xcconfig
├── LICENSE
├── angular.json
├── nativescript.config.ts
├── package-lock.json
├── package.json
├── references.d.ts
├── src
│ ├── app.css
│ ├── app
│ │ ├── app-routing.module.ts
│ │ ├── app.component.html
│ │ ├── app.component.ts
│ │ ├── app.module.ts
│ │ ├── auth-providers-helper.ts
│ │ ├── auth.service.ts
│ │ ├── authenticated
│ │ │ ├── authenticated.component.html
│ │ │ └── authenticated.component.ts
│ │ └── login
│ │ │ ├── login.component.html
│ │ │ └── login.component.ts
│ └── main.ts
├── tsconfig.json
├── tsfmt.json
└── webpack.config.js
├── demo-custom-provider
├── README.md
├── app
│ ├── App_Resources
│ │ ├── Android
│ │ │ ├── app.gradle
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── res
│ │ │ │ ├── drawable-hdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-ldpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-nodpi
│ │ │ │ └── splash_screen.xml
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── values-v21
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ └── iOS
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── icon-1024.png
│ │ │ │ ├── icon-29.png
│ │ │ │ ├── icon-29@2x.png
│ │ │ │ ├── icon-29@3x.png
│ │ │ │ ├── icon-40.png
│ │ │ │ ├── icon-40@2x.png
│ │ │ │ ├── icon-40@3x.png
│ │ │ │ ├── icon-60@2x.png
│ │ │ │ ├── icon-60@3x.png
│ │ │ │ ├── icon-76.png
│ │ │ │ ├── icon-76@2x.png
│ │ │ │ └── icon-83.5@2x.png
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.launchimage
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Default-1125h.png
│ │ │ │ ├── Default-568h@2x.png
│ │ │ │ ├── Default-667h@2x.png
│ │ │ │ ├── Default-736h@3x.png
│ │ │ │ ├── Default-Landscape-X.png
│ │ │ │ ├── Default-Landscape.png
│ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ ├── Default-Portrait.png
│ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ ├── Default.png
│ │ │ │ └── Default@2x.png
│ │ │ ├── LaunchScreen.AspectFill.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ └── LaunchScreen-AspectFill@2x.png
│ │ │ └── LaunchScreen.Center.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ └── LaunchScreen-Center@2x.png
│ │ │ ├── Info.plist
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── build.xcconfig
│ ├── app-root.xml
│ ├── app.css
│ ├── app.ts
│ ├── auth-service.ts
│ ├── main-page.ts
│ ├── main-page.xml
│ ├── main-view-model.ts
│ ├── my-oauth-provider.ts
│ └── package.json
├── package.json
├── tsconfig.json
└── tsconfig.tns.json
├── demo-vue
├── .gitignore
├── .migration_backup
│ ├── _backup.json
│ ├── app
│ │ └── package.json
│ └── package.json
├── app
│ ├── App_Resources
│ │ ├── Android
│ │ │ ├── app.gradle
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── res
│ │ │ │ ├── drawable-hdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-ldpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-nodpi
│ │ │ │ └── splash_screen.xml
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── values-v21
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ └── iOS
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── icon-1024.png
│ │ │ │ ├── icon-20.png
│ │ │ │ ├── icon-20@2x.png
│ │ │ │ ├── icon-20@3x.png
│ │ │ │ ├── icon-29.png
│ │ │ │ ├── icon-29@2x.png
│ │ │ │ ├── icon-29@3x.png
│ │ │ │ ├── icon-40.png
│ │ │ │ ├── icon-40@2x.png
│ │ │ │ ├── icon-40@3x.png
│ │ │ │ ├── icon-60@2x.png
│ │ │ │ ├── icon-60@3x.png
│ │ │ │ ├── icon-76.png
│ │ │ │ ├── icon-76@2x.png
│ │ │ │ └── icon-83.5@2x.png
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.launchimage
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Default-1125h.png
│ │ │ │ ├── Default-568h@2x.png
│ │ │ │ ├── Default-667h@2x.png
│ │ │ │ ├── Default-736h@3x.png
│ │ │ │ ├── Default-Landscape-X.png
│ │ │ │ ├── Default-Landscape-XR.png
│ │ │ │ ├── Default-Landscape-XS-Max.png
│ │ │ │ ├── Default-Landscape.png
│ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ ├── Default-Portrait-XR.png
│ │ │ │ ├── Default-Portrait-XS-Max.png
│ │ │ │ ├── Default-Portrait.png
│ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ ├── Default.png
│ │ │ │ └── Default@2x.png
│ │ │ ├── LaunchScreen.AspectFill.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ ├── LaunchScreen-AspectFill@2x.png
│ │ │ │ └── LaunchScreen-AspectFill@3x.png
│ │ │ └── LaunchScreen.Center.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ ├── LaunchScreen-Center@2x.png
│ │ │ │ └── LaunchScreen-Center@3x.png
│ │ │ ├── Info.plist
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── build.xcconfig
│ ├── _app-common.scss
│ ├── _app-variables.scss
│ ├── app.js
│ ├── app.scss
│ ├── auth-service.js
│ ├── components
│ │ └── Home.vue
│ └── fonts
│ │ └── FontAwesome.ttf
├── jsconfig.json
├── nativescript.config.ts
├── package-lock.json
├── package.json
└── tsconfig.json
├── demo
├── app
│ ├── App_Resources
│ │ ├── Android
│ │ │ ├── app.gradle
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── res
│ │ │ │ ├── drawable-hdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-ldpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-nodpi
│ │ │ │ └── splash_screen.xml
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── values-v21
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ └── iOS
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── icon-29.png
│ │ │ │ ├── icon-29@2x.png
│ │ │ │ ├── icon-29@3x.png
│ │ │ │ ├── icon-40.png
│ │ │ │ ├── icon-40@2x.png
│ │ │ │ ├── icon-40@3x.png
│ │ │ │ ├── icon-50.png
│ │ │ │ ├── icon-50@2x.png
│ │ │ │ ├── icon-57.png
│ │ │ │ ├── icon-57@2x.png
│ │ │ │ ├── icon-60@2x.png
│ │ │ │ ├── icon-60@3x.png
│ │ │ │ ├── icon-72.png
│ │ │ │ ├── icon-72@2x.png
│ │ │ │ ├── icon-76.png
│ │ │ │ ├── icon-76@2x.png
│ │ │ │ └── icon-83.5@2x.png
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.launchimage
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Default-568h@2x.png
│ │ │ │ ├── Default-667h@2x.png
│ │ │ │ ├── Default-736h@3x.png
│ │ │ │ ├── Default-Landscape.png
│ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ ├── Default-Portrait.png
│ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ ├── Default.png
│ │ │ │ └── Default@2x.png
│ │ │ ├── LaunchScreen.AspectFill.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ └── LaunchScreen-AspectFill@2x.png
│ │ │ └── LaunchScreen.Center.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ └── LaunchScreen-Center@2x.png
│ │ │ ├── Info.plist
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── build.xcconfig
│ ├── app-root.xml
│ ├── app.css
│ ├── app.ts
│ ├── auth-service.ts
│ ├── main-page.ts
│ ├── main-page.xml
│ └── main-view-model.ts
├── nativescript.config.ts
├── package-lock.json
├── package.json
├── references.d.ts
└── tsconfig.json
├── docs
└── images
│ └── nativescript-oauth2-logo.png
├── package-lock.json
├── publish
├── pack.sh
├── package-lock.json
├── package.json
└── publish.sh
├── src
├── .npmignore
├── delegate
│ ├── index.android.ts
│ ├── index.d.ts
│ └── index.ios.ts
├── index.d.ts
├── oauth.ts
├── package.json
├── pkce-util.android.ts
├── pkce-util.d.ts
├── pkce-util.ios.ts
├── platforms
│ └── android
│ │ └── include.gradle
├── providers
│ ├── index.d.ts
│ └── index.ts
├── references.d.ts
├── tns-oauth-auth-state.ts
├── tns-oauth-client-connection.ts
├── tns-oauth-login-sub-controller.ts
├── tns-oauth-login-webview-controller.ts
├── tns-oauth-native-view-controller.android.ts
├── tns-oauth-native-view-controller.d.ts
├── tns-oauth-native-view-controller.ios.ts
├── tns-oauth-utils.ts
├── tsconfig.json
└── types
│ └── android.d.ts
└── tslint.json
/.github/issue_template.md:
--------------------------------------------------------------------------------
1 | ### Make sure to check the demo app(s) for sample usage
2 |
3 | ### Make sure to check the existing issues in this repository
4 |
5 | ### If the demo apps cannot help and there is no issue for your problem, tell us about it
6 | Please, ensure your title is less than 63 characters long and starts with a capital
7 | letter.
8 |
9 | ### Which platform(s) does your issue occur on?
10 | - iOS/Android/Both
11 | - iOS/Android versions
12 | - emulator or device. What type of device?
13 |
14 | ### Please, provide the following version numbers that your issue occurs with:
15 |
16 | - CLI: (run `tns --version` to fetch it)
17 | - Cross-platform modules: (check the 'version' attribute in the
18 | `node_modules/tns-core-modules/package.json` file in your project)
19 | - Runtime(s): (look for the `"tns-android"` and `"tns-ios"` properties in the `package.json` file of your project)
20 | - Plugin(s): (look for the version numbers in the `package.json` file of your
21 | project and paste your dependencies and devDependencies here)
22 |
23 | ### Please, tell us how to recreate the issue in as much detail as possible.
24 | Describe the steps to reproduce it.
25 |
26 | ### Is there any code involved?
27 | - provide a code example to recreate the problem
28 | - (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible.
29 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 | ## PR Checklist
11 |
12 | - [ ] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages.
13 | - [ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it.
14 | - [ ] All existing tests are passing
15 | - [ ] Tests for the changes are included
16 |
17 | ## What is the current behavior?
18 |
19 |
20 | ## What is the new behavior?
21 |
22 |
23 | Fixes/Implements/Closes #[Issue Number].
24 |
25 |
26 |
27 |
36 |
37 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | .idea
3 | .DS_Store
4 | *.esm.json
5 | *.js
6 | *.js.map
7 | *.log
8 | src/*.d.ts
9 | !src/index.d.ts
10 | !src/pkce-util.d.ts
11 | !src/references.d.ts
12 | !src/tns-oauth-native-view-controller.d.ts
13 | !src/scripts/*.js
14 | !seed-tests/*.js
15 | seed-tests/seed-copy/**/*.*
16 | seed-tests/seed-copy-new-git-repo/**/*.*
17 | !demo/karma.conf.js
18 | !demo/app/tests/*.js
19 | demo/*.d.ts
20 | !demo/references.d.ts
21 | demo/lib
22 | demo/platforms
23 | node_modules
24 | publish/src
25 | publish/package
26 | demo/report/report.html
27 | demo/report/stats.json
28 | demo-angular/platforms
29 | demo-vue/platforms
30 | !demo-vue/**/*.js
31 | demo-vue/webpack.config.js
32 | demo-custom-provider/platforms
33 |
34 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | demo/
2 | demo-angular/
3 | demo-vue/
4 | demo-custom-provider/
5 | node_modules/
6 | hooks/
7 | *.log
8 | *.ts
9 | *.js.map
10 | tsconfig.json
11 |
12 | !index.d.ts
13 | !*.js
14 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | git:
2 | depth: 1
3 |
4 | branches:
5 | only:
6 | - master
7 | matrix:
8 | include:
9 | - stage: "Lint"
10 | language: node_js
11 | os: linux
12 | node_js: "8"
13 | script: cd src && npm run ci.tslint
14 | - stage: "Build"
15 | os: osx
16 | env:
17 | - Platform="iOS"
18 | - Type="VanillaJS"
19 | osx_image: xcode10.2
20 | language: node_js
21 | node_js: "10"
22 | jdk: oraclejdk8
23 | before_script: pod repo update
24 | script:
25 | - cd src && npm run build
26 | - cd ../demo && npm i && tns build ios --env.uglify
27 | - os: osx
28 | env:
29 | - Platform="iOS"
30 | - Type="VueJS"
31 | osx_image: xcode10.2
32 | language: node_js
33 | node_js: "10"
34 | jdk: oraclejdk8
35 | before_script: pod repo update
36 | script:
37 | - cd src && npm run build
38 | - cd ../demo-vue && npm i && tns build ios --env.uglify
39 | - os: osx
40 | env:
41 | - Platform="iOS"
42 | - Type="Angular"
43 | osx_image: xcode10.2
44 | language: node_js
45 | node_js: "10"
46 | jdk: oraclejdk8
47 | before_script: pod repo update
48 | script:
49 | - cd src && npm run build
50 | - cd ../demo-angular && npm i && tns build ios --env.uglify --env.aot
51 | - language: android
52 | os: linux
53 | dist: trusty
54 | env:
55 | - Platform="Android"
56 | - Type="VanillaJS"
57 | jdk: oraclejdk8
58 | before_install: nvm install 10
59 | script:
60 | - cd src && npm run build
61 | - cd ../demo && npm i && tns build android --env.uglify --env.snapshot
62 | - language: android
63 | os: linux
64 | dist: trusty
65 | env:
66 | - Platform="Android"
67 | - Type="VueJS"
68 | jdk: oraclejdk8
69 | before_install: nvm install 10
70 | script:
71 | - cd src && npm run build
72 | - cd ../demo-vue && npm i && tns build android --env.uglify --env.snapshot
73 | - language: android
74 | os: linux
75 | dist: trusty
76 | env:
77 | - Platform="Android"
78 | - Type="Angular"
79 | jdk: oraclejdk8
80 | before_install: nvm install 10
81 | script:
82 | - cd src && npm run build
83 | - cd ../demo-angular && npm i && tns build android --env.uglify --env.snapshot --env.aot
84 |
85 | android:
86 | components:
87 | - tools
88 | - platform-tools
89 | - build-tools-28.0.3
90 | - android-28
91 | - extra-android-m2repository
92 |
93 | before_cache:
94 | - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
95 |
96 | cache:
97 | directories:
98 | - .nvm
99 | - $HOME/.gradle/caches/
100 | - $HOME/.gradle/wrapper/
101 |
102 | before_install:
103 | - sudo pip install --upgrade pip
104 | - sudo pip install six
105 |
106 | install:
107 | - echo no | npm install -g nativescript
108 | - tns usage-reporting disable
109 | - tns error-reporting disable
110 |
111 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | nativescript-oauth2
4 | Copyright (c) 2016, Alexander Ziskind
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | this software and associated documentation files (the "Software"), to deal in
8 | the Software without restriction, including without limitation the rights to
9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10 | the Software, and to permit persons to whom the Software is furnished to do so,
11 | subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/demo-angular/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 | trim_trailing_whitespace = true
7 | charset = utf-8
8 |
9 | [*.json]
10 | indent_style = space
11 | indent_size = 2
12 |
13 | [*.ts]
14 | indent_style = space
15 | indent_size = 4
16 |
--------------------------------------------------------------------------------
/demo-angular/.gitignore:
--------------------------------------------------------------------------------
1 | # NativeScript
2 | hooks/
3 | node_modules/
4 | platforms/
5 |
6 | # NativeScript Template
7 | *.js.map
8 | *.js
9 | !webpack.config.js
10 |
11 | # Logs
12 | logs
13 | *.log
14 | npm-debug.log*
15 | yarn-debug.log*
16 | yarn-error.log*
17 |
18 | # General
19 | .DS_Store
20 | .AppleDouble
21 | .LSOverride
22 | .idea
23 | .cloud
24 | .project
25 | tmp/
26 | typings/
27 |
28 | # Visual Studio Code
29 | .vscode/*
30 | !.vscode/settings.json
31 | !.vscode/tasks.json
32 | !.vscode/launch.json
33 | !.vscode/extensions.json
34 |
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // implementation 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | // If you want to add something to be applied before applying plugins' include.gradle files
9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1"
10 | // create a file named before-plugins.gradle in the current directory and place it there
11 |
12 | android {
13 | defaultConfig {
14 | generatedDensities = []
15 | }
16 | aaptOptions {
17 | additionalParameters "--no-version-vectors"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo-angular/App_Resources/Android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "icon-20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "icon-20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "icon-29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "icon-29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "icon-40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "icon-40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "icon-60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "icon-20.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "icon-20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "icon-29.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "icon-29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "icon-40.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "icon-40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "icon-76.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "icon-76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "icon-83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "icon-1024.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchScreen.AspectFill@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen.AspectFill@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen.AspectFill@3x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchScreen.Center@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen.Center@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen.Center@3x.png
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 | CFBundleURLTypes
47 |
48 |
49 | CFBundleTypeRole
50 | Editor
51 | CFBundleURLName
52 | org.nativescript.testnsazmobaplugin
53 | CFBundleURLSchemes
54 |
55 | testnsazmobaplugin
56 | msalf376fa87-64a9-49a1-8b56-e0d48fc0810b
57 | fb691208554415645
58 | com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb
59 | org.nativescript.demoangular
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/demo-angular/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID;
6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
8 |
--------------------------------------------------------------------------------
/demo-angular/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "cli": {
6 | "defaultCollection": "@nativescript/schematics"
7 | },
8 | "projects": {
9 | "hello-world": {
10 | "root": "",
11 | "sourceRoot": "src",
12 | "projectType": "application",
13 | "prefix": "ns"
14 | }
15 | },
16 | "defaultProject": "hello-world"
17 | }
18 |
--------------------------------------------------------------------------------
/demo-angular/nativescript.config.ts:
--------------------------------------------------------------------------------
1 | import { NativeScriptConfig } from "@nativescript/core";
2 |
3 | export default {
4 | id: "org.nativescript.demoangular",
5 | appResourcesPath: "App_Resources",
6 | android: {
7 | v8Flags: "--expose_gc",
8 | markingMode: "none",
9 | },
10 | } as NativeScriptConfig;
11 |
--------------------------------------------------------------------------------
/demo-angular/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "NativeScript Application",
3 | "license": "SEE LICENSE IN ",
4 | "repository": "",
5 | "dependencies": {
6 | "@angular/animations": "~10.1.0",
7 | "@angular/common": "~10.1.0",
8 | "@angular/compiler": "~10.1.0",
9 | "@angular/core": "~10.1.0",
10 | "@angular/forms": "~10.1.0",
11 | "@angular/platform-browser": "~10.1.0",
12 | "@angular/platform-browser-dynamic": "~10.1.0",
13 | "@angular/router": "~10.1.0",
14 | "@nativescript/angular": "~10.1.0",
15 | "@nativescript/core": "~7.0.0",
16 | "@nativescript/theme": "~2.3.0",
17 | "reflect-metadata": "~0.1.12",
18 | "rxjs": "^6.6.0",
19 | "zone.js": "~0.11.1",
20 | "nativescript-oauth2": "file:../src"
21 | },
22 | "devDependencies": {
23 | "@angular/compiler-cli": "~10.1.0",
24 | "@nativescript/ios": "7.0.0",
25 | "@nativescript/types": "~7.0.0",
26 | "@nativescript/webpack": "~3.0.0",
27 | "@ngtools/webpack": "~10.1.0",
28 | "typescript": "~3.9.0"
29 | },
30 | "readme": "NativeScript Application",
31 | "main": "main.js"
32 | }
33 |
--------------------------------------------------------------------------------
/demo-angular/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/demo-angular/src/app.css:
--------------------------------------------------------------------------------
1 | /*
2 | In NativeScript, the app.css file is where you place CSS rules that
3 | you would like to apply to your entire application. Check out
4 | http://docs.nativescript.org/ui/styling for a full list of the CSS
5 | selectors and properties you can use to style UI components.
6 |
7 | /*
8 | In many cases you may want to use the NativeScript core theme instead
9 | of writing your own CSS rules. You can learn more about the
10 | NativeScript core theme at https://github.com/nativescript/theme
11 | The imported CSS rules must precede all other types of rules.
12 | */
13 | @import "~@nativescript/theme/css/core.css";
14 | @import "~@nativescript/theme/css/default.css";
15 |
16 | /* Place any CSS rules you want to apply on both iOS and Android here.
17 | This is where the vast majority of your CSS code goes. */
18 |
19 | /*
20 | The following CSS rule changes the font size of all Buttons that have the
21 | "-primary" class modifier.
22 | */
23 | Button.-primary {
24 | font-size: 18;
25 | }
26 |
--------------------------------------------------------------------------------
/demo-angular/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { NativeScriptRouterModule } from "@nativescript/angular";
3 | import { Routes } from "@angular/router";
4 | import { AuthenticatedComponent } from "./authenticated/authenticated.component";
5 | import { LoginComponent } from "./login/login.component";
6 |
7 | const routes: Routes = [
8 | { path: "", redirectTo: "/login", pathMatch: "full" },
9 | { path: "login", component: LoginComponent },
10 | { path: "authenticated", component: AuthenticatedComponent },
11 | ];
12 |
13 | @NgModule({
14 | imports: [NativeScriptRouterModule.forRoot(routes)],
15 | exports: [NativeScriptRouterModule],
16 | })
17 | export class AppRoutingModule {}
18 |
--------------------------------------------------------------------------------
/demo-angular/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/demo-angular/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from "@angular/core";
2 | import { Page } from "@nativescript/core";
3 |
4 | @Component({
5 | selector: "ns-app",
6 | moduleId: module.id,
7 | templateUrl: "app.component.html",
8 | })
9 | export class AppComponent {}
10 |
--------------------------------------------------------------------------------
/demo-angular/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
2 | import { NativeScriptModule } from "@nativescript/angular";
3 |
4 | import { AppRoutingModule } from "./app-routing.module";
5 | import { AppComponent } from "./app.component";
6 | import { AuthService } from "./auth.service";
7 | import { AuthenticatedComponent } from "./authenticated/authenticated.component";
8 | import { LoginComponent } from "./login/login.component";
9 |
10 | // Uncomment and add to NgModule imports if you need to use two-way binding
11 | // import { NativeScriptFormsModule } from "nativescript-angular/forms";
12 |
13 | // Uncomment and add to NgModule imports if you need to use the HttpClient wrapper
14 | // import { NativeScriptHttpClientModule } from "nativescript-angular/http-client";
15 |
16 | @NgModule({
17 | bootstrap: [AppComponent],
18 | imports: [NativeScriptModule, AppRoutingModule],
19 | declarations: [AppComponent, AuthenticatedComponent, LoginComponent],
20 | providers: [AuthService],
21 | schemas: [NO_ERRORS_SCHEMA],
22 | })
23 | /*
24 | Pass your application module to the bootstrapModule function located in main.ts to start your app
25 | */
26 | export class AppModule {}
27 |
--------------------------------------------------------------------------------
/demo-angular/src/app/auth-providers-helper.ts:
--------------------------------------------------------------------------------
1 | import {
2 | TnsOAuthClient,
3 | configureTnsOAuth,
4 | ITnsOAuthTokenResult
5 | } from "nativescript-oauth2";
6 | import {
7 | TnsOaProvider,
8 | TnsOaProviderOptionsFacebook,
9 | TnsOaProviderFacebook,
10 | TnsOaProviderOptionsGoogle,
11 | TnsOaProviderGoogle,
12 | TnsOaProviderOptionsMicrosoft,
13 | TnsOaProviderMicrosoft,
14 | TnsOaProviderOptionsIdentityServer,
15 | TnsOaProviderIdentityServer
16 | } from "nativescript-oauth2/providers";
17 |
18 | export function configureOAuthProviders() {
19 | const microsoftProvider = configureOAuthProviderMicrosoft();
20 | const googleProvider = configureOAuthProviderGoogle();
21 | const facebookProvider = configureOAuthProviderFacebook();
22 | const identityServer = configureOAuthProviderIdentityServer();
23 |
24 | configureTnsOAuth([microsoftProvider, googleProvider, facebookProvider, identityServer]);
25 | }
26 |
27 | export function configureOAuthProviderGoogle(): TnsOaProvider {
28 | const googleProviderOptions: TnsOaProviderOptionsGoogle = {
29 | openIdSupport: "oid-full",
30 | clientId:
31 | "932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb.apps.googleusercontent.com",
32 | redirectUri:
33 | "com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb:/auth",
34 | urlScheme:
35 | "com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb",
36 | scopes: ["email"]
37 | };
38 | const googleProvider = new TnsOaProviderGoogle(googleProviderOptions);
39 | return googleProvider;
40 | }
41 |
42 | export function configureOAuthProviderFacebook(): TnsOaProvider {
43 | const facebookProviderOptions: TnsOaProviderOptionsFacebook = {
44 | openIdSupport: "oid-none",
45 | clientId: "691208554415645",
46 | clientSecret: "d8725ac416fa1bb1917ccffd1670e3c6",
47 | redirectUri: "https://www.facebook.com/connect/login_success.html",
48 | scopes: ["email"]
49 | };
50 | const facebookProvider = new TnsOaProviderFacebook(facebookProviderOptions);
51 | return facebookProvider;
52 | }
53 |
54 | export function configureOAuthProviderMicrosoft(): TnsOaProvider {
55 | const microsoftProviderOptions: TnsOaProviderOptionsMicrosoft = {
56 | openIdSupport: "oid-full",
57 | clientId: "f376fa87-64a9-49a1-8b56-e0d48fc0810b",
58 | // redirectUri: "urn:ietf:wg:oauth:2.0:oob",
59 | redirectUri: "msalf376fa87-64a9-49a1-8b56-e0d48fc0810b://auth",
60 | urlScheme: "msalf376fa87-64a9-49a1-8b56-e0d48fc0810b",
61 | scopes: ["openid", "https://outlook.office.com/mail.read"]
62 | };
63 | const microsoftProvider = new TnsOaProviderMicrosoft(
64 | microsoftProviderOptions
65 | );
66 | return microsoftProvider;
67 | }
68 |
69 | export function configureOAuthProviderIdentityServer(): TnsOaProvider {
70 | const identityServerProviderOptions: TnsOaProviderOptionsIdentityServer = {
71 | openIdSupport: 'oid-full',
72 | issuerUrl: 'https://demo.identityserver.io',
73 | clientId: 'native.code',
74 | urlScheme: 'org.nativescript.demoangular',
75 | redirectUri: 'org.nativescript.demoangular://auth',
76 | scopes: ['openid', 'profile', 'email', 'offline_access'],
77 | };
78 | const identityServerProvider = new TnsOaProviderIdentityServer(
79 | identityServerProviderOptions
80 | );
81 | return identityServerProvider;
82 | }
83 |
--------------------------------------------------------------------------------
/demo-angular/src/app/auth.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from "@angular/core";
2 |
3 | import {
4 | TnsOAuthClient,
5 | ITnsOAuthTokenResult
6 | } from "nativescript-oauth2";
7 |
8 | @Injectable()
9 | export class AuthService {
10 | private client: TnsOAuthClient = null;
11 |
12 | constructor() { }
13 |
14 | public tnsOauthLogin(providerType): Promise {
15 | this.client = new TnsOAuthClient(providerType);
16 |
17 | return new Promise((resolve, reject) => {
18 | this.client.loginWithCompletion(
19 | (tokenResult: ITnsOAuthTokenResult, error) => {
20 | if (error) {
21 | console.error("back to main page with error: ");
22 | console.error(error);
23 | reject(error);
24 | } else {
25 | console.log("back to main page with access token: ");
26 | console.log(tokenResult);
27 | resolve(tokenResult);
28 | }
29 | }
30 | );
31 | });
32 | }
33 |
34 | public tnsOauthLogout(): Promise {
35 | return new Promise((resolve, reject) => {
36 | if (this.client) {
37 | this.client.logoutWithCompletion(
38 | (error) => {
39 | if (error) {
40 | console.error("back to main page with error: ");
41 | console.error(error);
42 | reject(error);
43 | } else {
44 | console.log("back to main page with success");
45 | resolve();
46 | }
47 | }
48 | );
49 | }
50 | else {
51 | console.log("back to main page with success");
52 | resolve();
53 | }
54 | });
55 | }
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/demo-angular/src/app/authenticated/authenticated.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/demo-angular/src/app/authenticated/authenticated.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from "@angular/core";
2 | import { RouterExtensions } from "@nativescript/angular";
3 | import { Page } from "@nativescript/core";
4 | import { AuthService } from "../auth.service";
5 |
6 | @Component({
7 | selector: "ns-authenticated",
8 | moduleId: module.id,
9 | templateUrl: "authenticated.component.html",
10 | })
11 | export class AuthenticatedComponent {
12 | constructor(
13 | private authService: AuthService,
14 | private routerExtensions: RouterExtensions
15 | ) {}
16 |
17 | public onTapLogout() {
18 | this.authService
19 | .tnsOauthLogout()
20 | .then(() => {
21 | this.routerExtensions.back();
22 | })
23 | .catch((e) => console.log("Error: " + e));
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/demo-angular/src/app/login/login.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/demo-angular/src/app/login/login.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from "@angular/core";
2 | import { RouterExtensions } from "@nativescript/angular";
3 | import { ITnsOAuthTokenResult } from "nativescript-oauth2";
4 | import { Page } from "@nativescript/core";
5 | import { AuthService } from "../auth.service";
6 |
7 | @Component({
8 | selector: "ns-login",
9 | moduleId: module.id,
10 | templateUrl: "login.component.html",
11 | })
12 | export class LoginComponent {
13 | constructor(
14 | private authService: AuthService,
15 | private routerExtensions: RouterExtensions
16 | ) {}
17 |
18 | public onTapLogin() {
19 | this.authService
20 | .tnsOauthLogin("microsoft")
21 | .then((result: ITnsOAuthTokenResult) => {
22 | console.log(
23 | "back to login component with token " + result.accessToken
24 | );
25 | this.routerExtensions
26 | .navigate(["../authenticated"])
27 | .then(() => console.log("navigated to /authenticated"))
28 | .catch((err) =>
29 | console.log(
30 | "error navigating to /authenticated: " + err
31 | )
32 | );
33 | })
34 | .catch((e) => console.log("Error: " + e));
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/demo-angular/src/main.ts:
--------------------------------------------------------------------------------
1 | // this import should be first in order to load some required settings (like globals and reflect-metadata)
2 | import { platformNativeScriptDynamic } from "@nativescript/angular";
3 |
4 | import { AppModule } from "./app/app.module";
5 | import { configureOAuthProviders } from "./app/auth-providers-helper";
6 |
7 | // A traditional NativeScript application starts by initializing global objects, setting up global CSS rules, creating, and navigating to the main page.
8 | // Angular applications need to take care of their own initialization: modules, components, directives, routes, DI providers.
9 | // A NativeScript Angular app needs to make both paradigms work together, so we provide a wrapper platform object, platformNativeScriptDynamic,
10 | // that sets up a NativeScript application and can bootstrap the Angular framework.
11 |
12 | configureOAuthProviders();
13 |
14 | platformNativeScriptDynamic().bootstrapModule(AppModule);
15 |
--------------------------------------------------------------------------------
/demo-angular/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "ESNext",
4 | "target": "es2015",
5 | "moduleResolution": "node",
6 | "experimentalDecorators": true,
7 | "emitDecoratorMetadata": true,
8 | "noEmitHelpers": true,
9 | "noEmitOnError": true,
10 | "skipLibCheck": true,
11 | "lib": ["es2018", "es2017", "dom", "es6"],
12 | "baseUrl": ".",
13 | "paths": {
14 | "~/*": ["app/*"]
15 | }
16 | },
17 | "include": ["src/tests/**/*.ts", "src/**/*.ios.ts", "src/**/*.android.ts"],
18 | "files": ["./references.d.ts", "./src/main.ts", "../src/oauth.ts"],
19 | "exclude": ["node_modules", "platforms", "e2e"]
20 | }
21 |
--------------------------------------------------------------------------------
/demo-angular/tsfmt.json:
--------------------------------------------------------------------------------
1 | {
2 | "indentSize": 2,
3 | "tabSize": 2
4 | }
5 |
--------------------------------------------------------------------------------
/demo-custom-provider/README.md:
--------------------------------------------------------------------------------
1 | # NativeScript TypeScript Template
2 |
3 | This template creates a NativeScript app with the NativeScript hello world example,
4 | however, in this template the example is built with TypeScript.
5 |
6 | You can create a new app that uses this template with either the `--template` option.
7 |
8 | ```
9 | tns create my-app-name --template tns-template-hello-world-ts
10 | ```
11 |
12 | Or the `--tsc` shorthand.
13 |
14 | ```
15 | tns create my-app-name --tsc
16 | ```
17 |
18 | > Note: Both commands will create a new NativeScript app that uses the latest version of this template published to [npm] (https://www.npmjs.com/package/tns-template-hello-world-ts).
19 |
20 | If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:
21 |
22 | ```
23 | tns create my-app-name --template https://github.com/NativeScript/template-hello-world-ts.git#master
24 | ```
25 | # Issues
26 |
27 | Issues related to `template-hello-world-ts` template should be logged in the https://github.com/NativeScript/NativeScript repository.
28 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // implementation 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | android {
9 | defaultConfig {
10 | generatedDensities = []
11 | }
12 | aaptOptions {
13 | additionalParameters "--no-version-vectors"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/Android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "icon-29.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "icon-29@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29@3x.png",
19 | "scale" : "3x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "icon-40@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "icon-40@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "60x60",
35 | "idiom" : "iphone",
36 | "filename" : "icon-60@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "60x60",
41 | "idiom" : "iphone",
42 | "filename" : "icon-60@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "29x29",
47 | "idiom" : "ipad",
48 | "filename" : "icon-29.png",
49 | "scale" : "1x"
50 | },
51 | {
52 | "size" : "29x29",
53 | "idiom" : "ipad",
54 | "filename" : "icon-29@2x.png",
55 | "scale" : "2x"
56 | },
57 | {
58 | "size" : "40x40",
59 | "idiom" : "ipad",
60 | "filename" : "icon-40.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "40x40",
65 | "idiom" : "ipad",
66 | "filename" : "icon-40@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "76x76",
71 | "idiom" : "ipad",
72 | "filename" : "icon-76.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "76x76",
77 | "idiom" : "ipad",
78 | "filename" : "icon-76@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "83.5x83.5",
83 | "idiom" : "ipad",
84 | "filename" : "icon-83.5@2x.png",
85 | "scale" : "2x"
86 | },
87 | {
88 | "size" : "1024x1024",
89 | "idiom" : "ios-marketing",
90 | "filename" : "icon-1024.png",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-custom-provider/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | // To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID;
6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
8 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/app-root.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/app.css:
--------------------------------------------------------------------------------
1 | /*
2 | In NativeScript, the app.css file is where you place CSS rules that
3 | you would like to apply to your entire application. Check out
4 | http://docs.nativescript.org/ui/styling for a full list of the CSS
5 | selectors and properties you can use to style UI components.
6 |
7 | /*
8 | In many cases you may want to use the NativeScript core theme instead
9 | of writing your own CSS rules. For a full list of class names in the theme
10 | refer to http://docs.nativescript.org/ui/theme.
11 | The imported CSS rules must precede all other types of rules.
12 | */
13 | @import '~nativescript-theme-core/css/core.light.css';
14 |
15 | /*
16 | The following CSS rule changes the font size of all UI
17 | components that have the btn class name.
18 | */
19 | .btn {
20 | font-size: 18;
21 | }
22 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/app.ts:
--------------------------------------------------------------------------------
1 | import * as application from "tns-core-modules/application";
2 | import { configureOAuthProviders } from "./auth-service";
3 |
4 | configureOAuthProviders();
5 |
6 | application.run({ moduleName: "app-root" });
7 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/auth-service.ts:
--------------------------------------------------------------------------------
1 | import {
2 | TnsOAuthClient,
3 | configureTnsOAuth,
4 | ITnsOAuthTokenResult
5 | } from "nativescript-oauth2";
6 | import {
7 | TnsOaProvider
8 | } from "nativescript-oauth2/providers";
9 | import { TnsOaProviderMyCustomProvider, TnsOaMyCustomProviderOptions } from "./my-oauth-provider";
10 |
11 | let client: TnsOAuthClient = null;
12 |
13 | export function configureOAuthProviders() {
14 | const myCustomProvider = configureOAuthProviderMyCustomProvider();
15 | configureTnsOAuth([myCustomProvider]);
16 | }
17 |
18 | function configureOAuthProviderMyCustomProvider(): TnsOaProvider {
19 | const facebookProviderOptions: TnsOaMyCustomProviderOptions = {
20 | openIdSupport: "oid-none",
21 | clientId: "691208554415645",
22 | clientSecret: "d8725ac416fa1bb1917ccffd1670e3c6",
23 | redirectUri: "https://www.facebook.com/connect/login_success.html",
24 | scopes: ["email"]
25 | };
26 | const facebookProvider = new TnsOaProviderMyCustomProvider(facebookProviderOptions);
27 | return facebookProvider;
28 | }
29 |
30 | export function tnsOauthLogin(providerType) {
31 | client = new TnsOAuthClient(providerType);
32 |
33 | client.loginWithCompletion((tokenResult: ITnsOAuthTokenResult, error) => {
34 | if (error) {
35 | console.error("back to main page with error: ");
36 | console.error(error);
37 | } else {
38 | console.log("back to main page with access token: ");
39 | console.log(tokenResult);
40 | }
41 | });
42 | }
43 |
44 | export function tnsOauthLogout() {
45 | if (client) {
46 | client.logout();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/main-page.ts:
--------------------------------------------------------------------------------
1 | import { EventData } from "tns-core-modules/data/observable";
2 | import { Page } from "tns-core-modules/ui/page";
3 | import { HelloWorldModel } from "./main-view-model";
4 | import { tnsOauthLogin, tnsOauthLogout } from "./auth-service";
5 |
6 | let page: Page;
7 |
8 | export function navigatingTo(args: EventData) {
9 | page = args.object;
10 | page.bindingContext = new HelloWorldModel();
11 | }
12 |
13 | export function onLoginTap() {
14 | tnsOauthLogin("myCustomProvider");
15 | }
16 |
17 | export function onLogoutTap() {
18 | tnsOauthLogout();
19 | }
20 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/main-page.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/main-view-model.ts:
--------------------------------------------------------------------------------
1 | import { Observable } from "tns-core-modules/data/observable";
2 |
3 | export class HelloWorldModel extends Observable {
4 | constructor() {
5 | super();
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/my-oauth-provider.ts:
--------------------------------------------------------------------------------
1 | import { TnsOaProvider, TnsOaProviderOptions, OpenIdSupportNone, TnsOaUnsafeProviderOptions } from "nativescript-oauth2/providers";
2 | import { ITnsOAuthTokenResult } from "nativescript-oauth2";
3 |
4 | export interface TnsOaMyCustomProviderOptions extends TnsOaUnsafeProviderOptions { }
5 |
6 | export class TnsOaProviderMyCustomProvider implements TnsOaProvider {
7 | public options: TnsOaProviderOptions;
8 | public openIdSupport: OpenIdSupportNone = "oid-none";
9 | public providerType = "myCustomProvider";
10 | public authority = "https://www.facebook.com/v3.1/dialog";
11 | public tokenEndpointBase = "https://graph.facebook.com";
12 | public authorizeEndpoint = "/oauth";
13 | public tokenEndpoint = "/v3.1/oauth/access_token";
14 | public cookieDomains = ["facebook.com"];
15 |
16 | constructor(options: TnsOaMyCustomProviderOptions) {
17 | this.options = options;
18 | }
19 |
20 | public parseTokenResult(jsonData): ITnsOAuthTokenResult {
21 | return jsonData;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/demo-custom-provider/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "app.js",
3 | "android": {
4 | "v8Flags": "--expose_gc"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo-custom-provider/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "nativescript": {
3 | "id": "org.nativescript.democustomprovider",
4 | "tns-android": {
5 | "version": "5.0.0"
6 | },
7 | "tns-ios": {
8 | "version": "5.0.0"
9 | }
10 | },
11 | "main": "app.js",
12 | "description": "NativeScript Application",
13 | "license": "SEE LICENSE IN ",
14 | "repository": "",
15 | "dependencies": {
16 | "nativescript-theme-core": "^1.0.4",
17 | "nativescript-unit-test-runner": "^0.3.4",
18 | "nativescript-oauth2": "file:../src",
19 | "tns-core-modules": "^5.1.1"
20 | },
21 | "devDependencies": {
22 | "jasmine-core": "^2.5.2",
23 | "karma": "^1.3.0",
24 | "karma-jasmine": "^1.0.2",
25 | "karma-nativescript-launcher": "^0.4.0",
26 | "nativescript-css-loader": "~0.26.1",
27 | "nativescript-dev-typescript": "~0.7.2",
28 | "nativescript-dev-webpack": "~0.17.0",
29 | "tns-platform-declarations": "^4.2.0",
30 | "tslint": "~5.4.3",
31 | "typescript": "3.1.1"
32 | },
33 | "readme": "NativeScript Application"
34 | }
35 |
--------------------------------------------------------------------------------
/demo-custom-provider/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5",
5 | "experimentalDecorators": true,
6 | "emitDecoratorMetadata": true,
7 | "noEmitHelpers": true,
8 | "noEmitOnError": true,
9 | "lib": [
10 | "es6",
11 | "dom"
12 | ],
13 | "baseUrl": ".",
14 | "paths": {
15 | "~/*": [
16 | "app/*"
17 | ],
18 | "*": [
19 | "./node_modules/tns-core-modules/*",
20 | "./node_modules/*"
21 | ]
22 | }
23 | },
24 | "exclude": [
25 | "node_modules",
26 | "platforms"
27 | ]
28 | }
--------------------------------------------------------------------------------
/demo-custom-provider/tsconfig.tns.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig",
3 | "compilerOptions": {
4 | "module": "es2015",
5 | "moduleResolution": "node"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/demo-vue/.gitignore:
--------------------------------------------------------------------------------
1 | # NativeScript
2 | hooks/
3 | !hooks/after-createProject/*.js
4 | node_modules/
5 | platforms/
6 |
7 | # NativeScript Template
8 | *.js.map
9 | *.css
10 |
11 | # Logs
12 | logs
13 | *.log
14 | npm-debug.log*
15 | yarn-debug.log*
16 | yarn-error.log*
17 |
18 | # General
19 | .DS_Store
20 | .AppleDouble
21 | .LSOverride
22 | .idea
23 | .cloud
24 | .project
25 | tmp/
26 | typings/
27 |
28 | # Visual Studio Code
29 | .vscode/*
30 | !.vscode/settings.json
31 | !.vscode/tasks.json
32 | !.vscode/launch.json
33 | !.vscode/extensions.json
34 |
--------------------------------------------------------------------------------
/demo-vue/.migration_backup/_backup.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "migration",
3 | "paths": [
4 | "package.json",
5 | "app/package.json",
6 | "package.json",
7 | "app/package.json"
8 | ]
9 | }
--------------------------------------------------------------------------------
/demo-vue/.migration_backup/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "app.js",
3 | "android": {
4 | "v8Flags": "--expose_gc",
5 | "markingMode": "none"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/demo-vue/.migration_backup/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "nativescript": {
3 | "id": "org.nativescript.demovue",
4 | "tns-android": {
5 | "version": "6.0.0"
6 | },
7 | "tns-ios": {
8 | "version": "6.0.1"
9 | }
10 | },
11 | "description": "NativeScript Application",
12 | "dependencies": {
13 | "nativescript-theme-core": "~1.0.6",
14 | "nativescript-oauth2": "../src",
15 | "nativescript-vue": "~2.4.0",
16 | "tns-core-modules": "~6.0.0"
17 | },
18 | "devDependencies": {
19 | "@babel/core": "~7.1.0",
20 | "@babel/preset-env": "~7.1.0",
21 | "babel-loader": "~8.0.0",
22 | "nativescript-dev-webpack": "~1.0.0",
23 | "nativescript-vue-template-compiler": "~2.4.0",
24 | "node-sass": "^4.7.1",
25 | "typescript": "~3.4.5",
26 | "vue-loader": "~15.4.0"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // implementation 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | // If you want to add something to be applied before applying plugins' include.gradle files
9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1"
10 | // create a file named before-plugins.gradle in the current directory and place it there
11 |
12 | android {
13 | defaultConfig {
14 | minSdkVersion 17
15 | generatedDensities = []
16 | }
17 | aaptOptions {
18 | additionalParameters "--no-version-vectors"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/Android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
17 |
18 |
20 |
21 |
22 |
29 |
30 |
32 |
33 |
34 |
39 |
40 |
42 |
43 |
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "icon-20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "icon-20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "icon-29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "icon-29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "icon-40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "icon-40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "icon-60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "icon-20.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "icon-20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "icon-29.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "icon-29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "icon-40.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "icon-40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "icon-76.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "icon-76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "icon-83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "icon-1024.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchScreen-AspectFill@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchScreen-Center@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 | UIStatusBarStyle
47 | UIStatusBarStyleLightContent
48 | UIViewControllerBasedStatusBarAppearance
49 |
50 | CFBundleURLTypes
51 |
52 |
53 | CFBundleTypeRole
54 | Editor
55 | CFBundleURLName
56 | org.nativescript.testnsazmobaplugin
57 | CFBundleURLSchemes
58 |
59 | testnsazmobaplugin
60 | msalf376fa87-64a9-49a1-8b56-e0d48fc0810b
61 | fb691208554415645
62 | com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb
63 | org.nativescript.demovue
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/demo-vue/app/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID;
6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
8 |
--------------------------------------------------------------------------------
/demo-vue/app/_app-common.scss:
--------------------------------------------------------------------------------
1 | // Place any CSS rules you want to apply on both iOS and Android here.
2 | // This is where the vast majority of your CSS code goes.
3 |
4 | //Font icon
5 | .fa {
6 | font-family: "FontAwesome";
7 | }
8 |
--------------------------------------------------------------------------------
/demo-vue/app/_app-variables.scss:
--------------------------------------------------------------------------------
1 | // Import the theme’s variables. If you’re using a color scheme
2 | // other than “light”, switch the path to the alternative scheme,
3 | // for example '~nativescript-theme-core/scss/dark'.
4 | @import '~nativescript-theme-core/scss/light';
5 |
6 | // Custom colors
7 | $background-dark: #F8F8F8 !default;
8 | $background-light: #FFFFFF !default;
9 |
10 | $blue-dark: #022734 !default;
11 | $blue-light: #02556E !default;
12 | $blue-50: rgba($blue-dark, 0.5) !default;
13 | $blue-20: rgba($blue-dark, 0.2) !default;
14 | $blue-10: rgba($blue-dark, 0.1) !default;
15 |
16 | $accent-dark: #3A53FF !default;
17 | $accent-light: #4781FE !default;
18 |
19 | $success-dark: #06CE6A !default;
20 | $success-light: #00E676 !default;
21 |
22 | $warning-dark: #f39c11 !default;
23 | $warning-light: #F2C112 !default;
24 |
25 | $error-dark: #D84039 !default;
26 | $error-light: #ED473F !default;
27 |
28 | $midnight-dark: #0F336D !default;
29 | $midnight-light: #14418B !default;
30 |
31 | $night-dark: #023141 !default;
32 | $night-light: #01526C !default;
33 |
34 | // Sizes
35 | $base-font-size: 11;
36 |
37 | $border-width: 1;
38 | $border-radius: 3;
39 |
40 |
41 | /**
42 | * Theme variables overrides
43 | **/
44 |
45 | // Colors
46 | $background: #fff;
47 | $primary: lighten(#000, 13%);
48 | $secondary: lighten(#000, 46%);
49 | $disabled: lighten(#000, 62%);
50 | $accent: $accent-dark;
51 | $error: $error-light;
52 |
53 | // SideDrawer
54 | $item-color-android : #737373;
55 | $item-active-background: #F8F8F8;
56 | $item-active-color: $accent;
57 | $item-active-icon-color: $item-active-color;
58 | $item-color-ios: $blue-dark;
59 | $item-color-android: $blue-dark;
60 |
61 | $side-drawer-header-background: #fafafa;
62 | $side-drawer-header-brand: #737373;
63 | $side-drawer-background: #FFFFFF;
64 |
65 | // ActionBar
66 | $ab-background: $accent;
67 | $ab-color: $white;
68 |
69 | // Buttons
70 | $btn-color-inverse: $white;
71 | $btn-color: $accent;
72 | $btn-color-secondary: darken($btn-color, 10%);
73 | $btn-color-outline-highlighted: lighten($btn-color, 10%);
74 |
75 | //Text colors
76 | $headings-color: $blue-dark;
77 | $secondary: $blue-dark;
78 | $text-color: $blue-dark;
--------------------------------------------------------------------------------
/demo-vue/app/app.js:
--------------------------------------------------------------------------------
1 | import Vue from "nativescript-vue";
2 |
3 | import Home from "./components/Home";
4 |
5 | // Prints Vue logs when --env.production is *NOT* set while building
6 | Vue.config.silent = (TNS_ENV === 'production')
7 |
8 | var auth_service_1 = require("./auth-service");
9 | auth_service_1.configureOAuthProviders();
10 |
11 | new Vue({
12 |
13 | template: `
14 |
15 |
16 | `,
17 |
18 | components: {
19 | Home
20 | }
21 | }).$start();
22 |
--------------------------------------------------------------------------------
/demo-vue/app/app.scss:
--------------------------------------------------------------------------------
1 | // Import app variables
2 | @import 'app-variables';
3 |
4 | // Import the theme’s main ruleset - both index and platform specific.
5 | @import '~nativescript-theme-core/scss/index';
6 | @import '~nativescript-theme-core/scss/platforms/index.android';
7 |
8 | // Import common styles
9 | @import 'app-common';
10 |
--------------------------------------------------------------------------------
/demo-vue/app/auth-service.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var nativescript_oauth2_1 = require("nativescript-oauth2");
4 | var providers_1 = require("nativescript-oauth2/providers");
5 | var client = null;
6 | function configureOAuthProviders() {
7 | var microsoftProvider = configureOAuthProviderMicrosoft();
8 | var googleProvider = configureOAuthProviderGoogle();
9 | var facebookProvider = configureOAuthProviderFacebook();
10 | nativescript_oauth2_1.configureTnsOAuth([microsoftProvider, googleProvider, facebookProvider]);
11 | }
12 | exports.configureOAuthProviders = configureOAuthProviders;
13 | function configureOAuthProviderGoogle() {
14 | var googleProviderOptions = {
15 | openIdSupport: "oid-full",
16 | clientId: "932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb.apps.googleusercontent.com",
17 | redirectUri: "com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb:/auth",
18 | urlScheme: "com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb",
19 | scopes: ["email"]
20 | };
21 | var googleProvider = new providers_1.TnsOaProviderGoogle(googleProviderOptions);
22 | return googleProvider;
23 | }
24 | function configureOAuthProviderFacebook() {
25 | var facebookProviderOptions = {
26 | openIdSupport: "oid-none",
27 | clientId: "691208554415645",
28 | clientSecret: "d8725ac416fa1bb1917ccffd1670e3c6",
29 | redirectUri: "https://www.facebook.com/connect/login_success.html",
30 | scopes: ["email"]
31 | };
32 | var facebookProvider = new providers_1.TnsOaProviderFacebook(facebookProviderOptions);
33 | return facebookProvider;
34 | }
35 | function configureOAuthProviderMicrosoft() {
36 | var microsoftProviderOptions = {
37 | openIdSupport: "oid-full",
38 | clientId: "f376fa87-64a9-49a1-8b56-e0d48fc0810b",
39 | // redirectUri: "urn:ietf:wg:oauth:2.0:oob",
40 | redirectUri: "msalf376fa87-64a9-49a1-8b56-e0d48fc0810b://auth",
41 | urlScheme: "msalf376fa87-64a9-49a1-8b56-e0d48fc0810b",
42 | scopes: ["https://outlook.office.com/mail.read"]
43 | };
44 | var microsoftProvider = new providers_1.TnsOaProviderMicrosoft(microsoftProviderOptions);
45 | return microsoftProvider;
46 | }
47 | function tnsOauthLogin(providerType) {
48 | client = new nativescript_oauth2_1.TnsOAuthClient(providerType);
49 | client.loginWithCompletion(function (tokenResult, error) {
50 | if (error) {
51 | console.error("back to main page with error: ");
52 | console.error(error);
53 | }
54 | else {
55 | console.log("back to main page with access token: ");
56 | console.log(tokenResult);
57 | }
58 | });
59 | }
60 | exports.tnsOauthLogin = tnsOauthLogin;
61 | function tnsOauthLogout() {
62 | if (client) {
63 | client.logout();
64 | }
65 | }
66 | exports.tnsOauthLogout = tnsOauthLogout;
67 |
--------------------------------------------------------------------------------
/demo-vue/app/components/Home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
31 |
32 |
46 |
--------------------------------------------------------------------------------
/demo-vue/app/fonts/FontAwesome.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo-vue/app/fonts/FontAwesome.ttf
--------------------------------------------------------------------------------
/demo-vue/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "./",
4 | "paths": {
5 | "*": ["./node_modules/tns-core-modules/*", "./node_modules/*"],
6 | "~/*": ["app/*"]
7 | }
8 | },
9 | "include": ["app/**/*"]
10 | }
11 |
--------------------------------------------------------------------------------
/demo-vue/nativescript.config.ts:
--------------------------------------------------------------------------------
1 | import { NativeScriptConfig } from '@nativescript/core'
2 |
3 | export default {
4 | id: 'org.nativescript.demovue',
5 | appResourcesPath: 'app/App_Resources',
6 | android: {
7 | v8Flags: '--expose_gc',
8 | markingMode: 'none',
9 | },
10 | appPath: 'app',
11 | } as NativeScriptConfig
12 |
--------------------------------------------------------------------------------
/demo-vue/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "NativeScript Application",
3 | "dependencies": {
4 | "nativescript-theme-core": "~1.0.6",
5 | "nativescript-oauth2": "../src",
6 | "nativescript-vue": "2.8.0",
7 | "@nativescript/core": "7.0.0",
8 | "@nativescript/webpack": "3.0.0"
9 | },
10 | "devDependencies": {
11 | "@babel/core": "~7.1.0",
12 | "@babel/preset-env": "~7.1.0",
13 | "@nativescript/ios": "7.0.0",
14 | "babel-loader": "~8.0.0",
15 | "nativescript-vue-template-compiler": "2.8.0",
16 | "node-sass": "^4.7.1",
17 | "typescript": "3.9.7",
18 | "vue-loader": "15.9.3"
19 | },
20 | "main": "app.js"
21 | }
22 |
--------------------------------------------------------------------------------
/demo-vue/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "esnext",
4 | "target": "es2017",
5 | "experimentalDecorators": true,
6 | "emitDecoratorMetadata": true,
7 | "noEmitHelpers": true,
8 | "importHelpers": true,
9 | "noEmitOnError": true,
10 | "lib": [
11 | "es6",
12 | "dom",
13 | "es2015.iterable",
14 | "es2017"
15 | ],
16 | "baseUrl": ".",
17 | "paths": {
18 | "~/*": [
19 | "app/*"
20 | ],
21 | "*": [
22 | "./node_modules/tns-core-modules/*",
23 | "./node_modules/*"
24 | ]
25 | },
26 | "moduleResolution": "node",
27 | "removeComments": false
28 | }
29 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // compile 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | //dependencies {
9 | // implementation 'androidx.browser:browser:1.2.0'
10 | //}
11 |
12 | android {
13 | defaultConfig {
14 | generatedDensities = []
15 | applicationId = "org.nativescript.demo"
16 | }
17 | aaptOptions {
18 | additionalParameters "--no-version-vectors"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/AndroidManifest.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 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "icon-29.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "icon-29@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29@3x.png",
19 | "scale" : "3x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "icon-40@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "icon-40@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "57x57",
35 | "idiom" : "iphone",
36 | "filename" : "icon-57.png",
37 | "scale" : "1x"
38 | },
39 | {
40 | "size" : "57x57",
41 | "idiom" : "iphone",
42 | "filename" : "icon-57@2x.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "icon-60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "29x29",
59 | "idiom" : "ipad",
60 | "filename" : "icon-29.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "29x29",
65 | "idiom" : "ipad",
66 | "filename" : "icon-29@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "40x40",
71 | "idiom" : "ipad",
72 | "filename" : "icon-40.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "40x40",
77 | "idiom" : "ipad",
78 | "filename" : "icon-40@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "50x50",
83 | "idiom" : "ipad",
84 | "filename" : "icon-50.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "50x50",
89 | "idiom" : "ipad",
90 | "filename" : "icon-50@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "72x72",
95 | "idiom" : "ipad",
96 | "filename" : "icon-72.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "72x72",
101 | "idiom" : "ipad",
102 | "filename" : "icon-72@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "76x76",
107 | "idiom" : "ipad",
108 | "filename" : "icon-76.png",
109 | "scale" : "1x"
110 | },
111 | {
112 | "size" : "76x76",
113 | "idiom" : "ipad",
114 | "filename" : "icon-76@2x.png",
115 | "scale" : "2x"
116 | },
117 | {
118 | "size" : "83.5x83.5",
119 | "idiom" : "ipad",
120 | "filename" : "icon-83.5@2x.png",
121 | "scale" : "2x"
122 | }
123 | ],
124 | "info" : {
125 | "version" : 1,
126 | "author" : "xcode"
127 | }
128 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 | CFBundleURLTypes
47 |
48 |
49 | CFBundleTypeRole
50 | Editor
51 | CFBundleURLName
52 | org.nativescript.testnsazmobaplugin
53 | CFBundleURLSchemes
54 |
55 | testnsazmobaplugin
56 | msalf376fa87-64a9-49a1-8b56-e0d48fc0810b
57 | fb691208554415645
58 | com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb
59 | org.nativescript.demo
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/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 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
5 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
6 |
--------------------------------------------------------------------------------
/demo/app/app-root.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/demo/app/app.css:
--------------------------------------------------------------------------------
1 | @import '~nativescript-theme-core/css/core.light.css';
2 |
--------------------------------------------------------------------------------
/demo/app/app.ts:
--------------------------------------------------------------------------------
1 | import { Application } from "@nativescript/core";
2 |
3 | import { configureOAuthProviders } from "./auth-service";
4 |
5 | configureOAuthProviders();
6 |
7 | Application.run({ moduleName: "app-root" });
8 |
--------------------------------------------------------------------------------
/demo/app/auth-service.ts:
--------------------------------------------------------------------------------
1 | import {
2 | TnsOAuthClient,
3 | configureTnsOAuth,
4 | ITnsOAuthTokenResult
5 | } from "nativescript-oauth2";
6 | import {
7 | TnsOaProvider,
8 | TnsOaProviderOptionsFacebook,
9 | TnsOaProviderFacebook,
10 | TnsOaProviderOptionsGoogle,
11 | TnsOaProviderGoogle,
12 | TnsOaProviderOptionsMicrosoft,
13 | TnsOaProviderMicrosoft
14 | } from "nativescript-oauth2/providers";
15 |
16 | let client: TnsOAuthClient = null;
17 |
18 | export function configureOAuthProviders() {
19 | const microsoftProvider = configureOAuthProviderMicrosoft();
20 | const googleProvider = configureOAuthProviderGoogle();
21 | const facebookProvider = configureOAuthProviderFacebook();
22 |
23 | configureTnsOAuth([microsoftProvider, googleProvider, facebookProvider]);
24 | }
25 |
26 | function configureOAuthProviderGoogle(): TnsOaProvider {
27 | const googleProviderOptions: TnsOaProviderOptionsGoogle = {
28 | openIdSupport: "oid-full",
29 | clientId:
30 | "932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb.apps.googleusercontent.com",
31 | redirectUri:
32 | "com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb:/auth",
33 | urlScheme:
34 | "com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb",
35 | scopes: ["email"]
36 | };
37 | const googleProvider = new TnsOaProviderGoogle(googleProviderOptions);
38 | return googleProvider;
39 | }
40 |
41 | function configureOAuthProviderFacebook(): TnsOaProvider {
42 | const facebookProviderOptions: TnsOaProviderOptionsFacebook = {
43 | openIdSupport: "oid-none",
44 | clientId: "691208554415645",
45 | clientSecret: "d8725ac416fa1bb1917ccffd1670e3c6",
46 | redirectUri: "https://www.facebook.com/connect/login_success.html",
47 | scopes: ["email"]
48 | };
49 | const facebookProvider = new TnsOaProviderFacebook(facebookProviderOptions);
50 | return facebookProvider;
51 | }
52 |
53 | function configureOAuthProviderMicrosoft(): TnsOaProvider {
54 | const microsoftProviderOptions: TnsOaProviderOptionsMicrosoft = {
55 | openIdSupport: "oid-full",
56 | clientId: "f376fa87-64a9-49a1-8b56-e0d48fc0810b",
57 | // redirectUri: "urn:ietf:wg:oauth:2.0:oob",
58 | redirectUri: "msalf376fa87-64a9-49a1-8b56-e0d48fc0810b://auth",
59 | urlScheme: "msalf376fa87-64a9-49a1-8b56-e0d48fc0810b",
60 | scopes: ["https://outlook.office.com/mail.read"]
61 | };
62 | const microsoftProvider = new TnsOaProviderMicrosoft(
63 | microsoftProviderOptions
64 | );
65 | return microsoftProvider;
66 | }
67 |
68 | export function tnsOauthLogin(providerType) {
69 | // PKCE is enabled by default, but you can pass in 'false' here if you'd like to disable it
70 | client = new TnsOAuthClient(providerType, true);
71 |
72 | client.loginWithCompletion((tokenResult: ITnsOAuthTokenResult, error) => {
73 | if (error) {
74 | console.error("back to main page with error: ");
75 | console.error(error);
76 | } else {
77 | console.log("back to main page with access token: ");
78 | console.log(tokenResult);
79 | }
80 | });
81 | }
82 |
83 | export function tnsRefreshOAuthAccessToken() {
84 | if (!client) {
85 | return;
86 | }
87 |
88 | client.refreshTokenWithCompletion((tokenResult: ITnsOAuthTokenResult, error) => {
89 | if (error) {
90 | console.error("back to main page with error: ");
91 | console.error(error);
92 | } else {
93 | console.log("back to main page with token: ");
94 | console.log(tokenResult);
95 | }
96 | });
97 | }
98 |
99 | export function tnsOauthLogout() {
100 | if (client) {
101 | client.logout();
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/demo/app/main-page.ts:
--------------------------------------------------------------------------------
1 | import { Page, EventData } from "@nativescript/core";
2 | import { HelloWorldModel } from "./main-view-model";
3 | import {
4 | tnsOauthLogin,
5 | tnsOauthLogout,
6 | tnsRefreshOAuthAccessToken,
7 | } from "./auth-service";
8 |
9 | let page: Page;
10 |
11 | export function navigatingTo(args: EventData) {
12 | page = args.object;
13 | page.bindingContext = new HelloWorldModel();
14 | }
15 |
16 | export function onLoginTap() {
17 | tnsOauthLogin("microsoft");
18 | }
19 |
20 | export function onRefreshTokenTap() {
21 | tnsRefreshOAuthAccessToken();
22 | }
23 |
24 | export function onLogoutTap() {
25 | tnsOauthLogout();
26 | }
27 |
--------------------------------------------------------------------------------
/demo/app/main-page.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/demo/app/main-view-model.ts:
--------------------------------------------------------------------------------
1 | import { Observable } from "@nativescript/core";
2 |
3 | export class HelloWorldModel extends Observable {
4 | constructor() {
5 | super();
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/demo/nativescript.config.ts:
--------------------------------------------------------------------------------
1 | import { NativeScriptConfig } from "@nativescript/core";
2 |
3 | export default {
4 | id: "org.nativescript.demo",
5 | android: {
6 | v8Flags: "--expose_gc",
7 | markingMode: "none",
8 | },
9 | } as NativeScriptConfig;
10 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "app.js",
3 | "dependencies": {
4 | "@nativescript/core": "~7.0.13",
5 | "nativescript-theme-core": "1.0.4",
6 | "nativescript-unit-test-runner": "0.7.0",
7 | "nativescript-oauth2": "file:../src"
8 | },
9 | "devDependencies": {
10 | "@nativescript/android": "7.0.1",
11 | "@nativescript/ios": "7.0.4",
12 | "@nativescript/types": "~7.0.4",
13 | "@nativescript/webpack": "~3.0.8",
14 | "jasmine-core": "^2.5.2",
15 | "karma": "4.1.0",
16 | "karma-jasmine": "2.0.1",
17 | "karma-nativescript-launcher": "0.4.0",
18 | "karma-webpack": "3.0.5",
19 | "tslint": "5.11.0",
20 | "typescript": "4.0.5"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/demo/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "esnext",
4 | "target": "es2017",
5 | "moduleResolution": "node",
6 | "experimentalDecorators": true,
7 | "emitDecoratorMetadata": true,
8 | "noEmitHelpers": true,
9 | "noEmitOnError": true,
10 | "lib": ["es2017", "dom"],
11 | "baseUrl": ".",
12 | "paths": {
13 | "~/*": ["app/*"]
14 | }
15 | },
16 | "exclude": ["node_modules", "platforms"]
17 | }
18 |
--------------------------------------------------------------------------------
/docs/images/nativescript-oauth2-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexziskind1/nativescript-oauth2/ad28fb447213f6bbf60c099607b2326d4e64247e/docs/images/nativescript-oauth2-logo.png
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "lockfileVersion": 1
3 | }
4 |
--------------------------------------------------------------------------------
/publish/pack.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | SOURCE_DIR=../src;
4 | TO_SOURCE_DIR=src;
5 | PACK_DIR=package;
6 | ROOT_DIR=..;
7 | PUBLISH=--publish
8 |
9 | install(){
10 | npm i
11 | }
12 |
13 | pack() {
14 |
15 | echo 'Clearing /src and /package...'
16 | node_modules/.bin/rimraf "$TO_SOURCE_DIR"
17 | node_modules/.bin/rimraf "$PACK_DIR"
18 |
19 | # copy src
20 | echo 'Copying src...'
21 | node_modules/.bin/ncp "$SOURCE_DIR" "$TO_SOURCE_DIR"
22 |
23 | # copy README & LICENSE to src
24 | echo 'Copying README and LICENSE to /src...'
25 | node_modules/.bin/ncp "$ROOT_DIR"/LICENSE "$TO_SOURCE_DIR"/LICENSE
26 | node_modules/.bin/ncp "$ROOT_DIR"/README.md "$TO_SOURCE_DIR"/README.md
27 |
28 | # compile package and copy files required by npm
29 | echo 'Building /src...'
30 | cd "$TO_SOURCE_DIR"
31 | npm run build
32 | cd ..
33 |
34 | echo 'Creating package...'
35 | # create package dir
36 | mkdir "$PACK_DIR"
37 |
38 | # create the package
39 | cd "$PACK_DIR"
40 | npm pack ../"$TO_SOURCE_DIR"
41 |
42 | # delete source directory used to create the package
43 | cd ..
44 | node_modules/.bin/rimraf "$TO_SOURCE_DIR"
45 | }
46 |
47 | install && pack
48 |
--------------------------------------------------------------------------------
/publish/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-publish",
3 | "version": "1.0.0",
4 | "description": "Publish helper",
5 | "devDependencies": {
6 | "ncp": "^2.0.0",
7 | "rimraf": "^2.5.0"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/publish/publish.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | PACK_DIR=package;
4 |
5 | publish() {
6 | cd $PACK_DIR
7 | echo 'Publishing to npm...'
8 | npm publish *.tgz
9 | }
10 |
11 | ./pack.sh && publish
--------------------------------------------------------------------------------
/src/.npmignore:
--------------------------------------------------------------------------------
1 | *.map
2 | *.ts
3 | !*.d.ts
4 | tsconfig.json
5 | scripts/*
6 | platforms/android/*
7 | !platforms/android/include.gradle
8 | !platforms/android/*.aar
9 | !platforms/android/*.jar
--------------------------------------------------------------------------------
/src/delegate/index.android.ts:
--------------------------------------------------------------------------------
1 | import { Application, AndroidApplication } from "@nativescript/core";
2 |
3 | import { TnsOAuthClient } from "../index";
4 |
5 | Application.android.on(AndroidApplication.activityResumedEvent, (args) => {
6 | if (
7 | new String(args.activity.getIntent().getAction()).valueOf() ===
8 | new String(android.content.Intent.ACTION_VIEW).valueOf()
9 | ) {
10 | const url = args.activity.getIntent().getData().toString();
11 | if (TnsOAuthClientAppDelegate._client) {
12 | TnsOAuthClientAppDelegate._client.resumeWithUrl(url);
13 | }
14 | console.log(args.activity.getIntent().getData());
15 | } else {
16 | if (TnsOAuthClientAppDelegate._client) {
17 | TnsOAuthClientAppDelegate._client.resumeWithUrl(null);
18 | }
19 | }
20 | });
21 |
22 | export class TnsOAuthClientAppDelegate {
23 | static _client: TnsOAuthClient;
24 | private static _urlScheme: string;
25 |
26 | public static setConfig(client: TnsOAuthClient, urlScheme: string) {
27 | this._client = client;
28 | this._urlScheme = urlScheme;
29 | }
30 |
31 | public static doRegisterDelegates() {
32 | // Nothing.
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/delegate/index.d.ts:
--------------------------------------------------------------------------------
1 | import { TnsOAuthClient } from "../index";
2 |
3 | export declare class TnsOAuthClientAppDelegate {
4 | public static setConfig(client: TnsOAuthClient, urlScheme: string);
5 | public static doRegisterDelegates();
6 | }
7 |
--------------------------------------------------------------------------------
/src/delegate/index.ios.ts:
--------------------------------------------------------------------------------
1 | import * as applicationModule from '@nativescript/core/application';
2 | import { TnsOAuthClient } from "../index";
3 |
4 | function setup() {
5 | class TnsOAuthClientAppDelegate {
6 | private static _client: TnsOAuthClient;
7 | private static _urlScheme: string;
8 |
9 | public static setConfig(client: TnsOAuthClient, urlScheme: string) {
10 | this._client = client;
11 | this._urlScheme = urlScheme;
12 | }
13 |
14 | private static getAppDelegate() {
15 | // As of NativeScript 8.2, ensureNativeApplication should be called prior to accesses to applicationModule.ios.
16 | /* @ts-ignore */
17 | if (!!applicationModule.ensureNativeApplication) {
18 | /* @ts-ignore */
19 | applicationModule.ensureNativeApplication();
20 | }
21 | // Play nice with other plugins by not completely ignoring anything already added to the appdelegate
22 | if (applicationModule.ios.delegate === undefined) {
23 | @NativeClass
24 | class UIApplicationDelegateImpl extends UIResponder implements UIApplicationDelegate {
25 | public static ObjCProtocols = [UIApplicationDelegate];
26 | }
27 |
28 | applicationModule.ios.delegate = UIApplicationDelegateImpl;
29 | }
30 | return applicationModule.ios.delegate;
31 | }
32 |
33 | private static addAppDelegateMethods = appDelegate => {
34 | // iOS >= 10
35 | appDelegate.prototype.applicationOpenURLOptions = (
36 | application: UIApplication,
37 | url: NSURL,
38 | options: NSDictionary) => {
39 | TnsOAuthClientAppDelegate.handleIncomingUrl(url);
40 | };
41 | // iOS < 10
42 | appDelegate.prototype.applicationOpenURLSourceApplicationAnnotation = (
43 | application: UIApplication,
44 | url: NSURL,
45 | sourceApplication: string,
46 | annotation: any) => {
47 | TnsOAuthClientAppDelegate.handleIncomingUrl(url);
48 | };
49 | }
50 |
51 | public static doRegisterDelegates() {
52 | this.addAppDelegateMethods(this.getAppDelegate());
53 | }
54 |
55 | private static handleIncomingUrl(url: NSURL): boolean {
56 | if (
57 | !TnsOAuthClientAppDelegate._client ||
58 | !TnsOAuthClientAppDelegate._urlScheme
59 | ) {
60 | // the delegate wasn't wired to the client, that should have resulted in an errormessage already
61 | console.log("IMPORTANT: Could not complete login flow.");
62 | return false;
63 | }
64 |
65 | if (url.scheme.toLowerCase() === TnsOAuthClientAppDelegate._urlScheme) {
66 | TnsOAuthClientAppDelegate._client.resumeWithUrl(url.absoluteString);
67 | return true;
68 | } else {
69 | return false;
70 | }
71 | }
72 | }
73 | return TnsOAuthClientAppDelegate;
74 | }
75 |
76 | export const TnsOAuthClientAppDelegate = setup();
77 |
--------------------------------------------------------------------------------
/src/index.d.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Application,
3 | Frame,
4 | HttpResponse,
5 | LoadEventData,
6 | } from "@nativescript/core";
7 | import { TnsOaProvider, TnsOaProviderType } from "./providers";
8 |
9 | export declare interface ITnsOAuthTokenResult {
10 | accessToken: string;
11 | refreshToken: string;
12 | idToken: string;
13 | accessTokenExpiration: Date;
14 | refreshTokenExpiration: Date;
15 | idTokenExpiration: Date;
16 | }
17 |
18 | export type TnsOAuthClientLoginBlock = (
19 | tokenResult: ITnsOAuthTokenResult,
20 | error
21 | ) => void;
22 | export type TnsOAuthClientLogoutBlock = (error) => void;
23 | export type TnsOAuthPageLoadStarted = (args: LoadEventData) => void;
24 | export type TnsOAuthPageLoadFinished = (args: LoadEventData) => void;
25 |
26 | export type TnsOAuthResponseBlock = (
27 | data?: any,
28 | response?: HttpResponse,
29 | error?: Error
30 | ) => void;
31 |
32 | export declare class TnsOAuthClient {
33 | // private loginController;
34 | provider: TnsOaProvider;
35 | tokenResult: ITnsOAuthTokenResult;
36 | codeVerifier?: string;
37 | pkce?: boolean;
38 | constructor(providerType: TnsOaProviderType, pkce?: boolean);
39 | loginWithCompletion(completion?: TnsOAuthClientLoginBlock): void;
40 | logoutWithCompletion(completion?: TnsOAuthResponseBlock): void;
41 | refreshTokenWithCompletion(completion?: TnsOAuthClientLoginBlock): void;
42 | resumeWithUrl(url: string): void;
43 | logout(successPage?: string): void;
44 | // private removeCookies();
45 | // private removeToken();
46 | // private callRevokeEndpoint();
47 | }
48 |
49 | export function configureTnsOAuth(providers: TnsOaProvider[]): void;
50 |
51 | export interface ITnsOAuthLoginController {
52 | loginWithParametersFrameCompletion(
53 | parameters,
54 | frame: Frame,
55 | urlScheme?: string,
56 | completion?: TnsOAuthClientLoginBlock
57 | );
58 | logoutWithParametersFrameCompletion(
59 | parameters,
60 | frame: Frame,
61 | urlScheme?: string,
62 | completion?: TnsOAuthClientLogoutBlock
63 | );
64 | resumeWithUrl(url: string);
65 | }
66 |
--------------------------------------------------------------------------------
/src/pkce-util.android.ts:
--------------------------------------------------------------------------------
1 | const DEFAULT_CODE_VERIFIER_ENTROPY = 64;
2 | const PKCE_BASE64_ENCODE_SETTINGS = android.util.Base64.NO_WRAP | android.util.Base64.NO_PADDING | android.util.Base64.URL_SAFE;
3 |
4 | export function getCodeVerifier(): string {
5 | const randomBytes = Array.create("byte", DEFAULT_CODE_VERIFIER_ENTROPY);
6 | new java.security.SecureRandom().nextBytes(randomBytes);
7 | return android.util.Base64.encodeToString(randomBytes, PKCE_BASE64_ENCODE_SETTINGS);
8 | }
9 |
10 | export function sha256base64encoded(codeVerifier: string): string {
11 | const sha256Digester = java.security.MessageDigest.getInstance("SHA-256");
12 | sha256Digester.update(new java.lang.String(codeVerifier).getBytes("ISO_8859_1"));
13 | const digestBytes = sha256Digester.digest();
14 | return android.util.Base64.encodeToString(digestBytes, PKCE_BASE64_ENCODE_SETTINGS);
15 | }
--------------------------------------------------------------------------------
/src/pkce-util.d.ts:
--------------------------------------------------------------------------------
1 | export function getCodeVerifier(): string;
2 |
3 | export function sha256base64encoded(inputString: string): string;
--------------------------------------------------------------------------------
/src/pkce-util.ios.ts:
--------------------------------------------------------------------------------
1 | const SHA256_DIGEST_LENGTH = 32;
2 |
3 | export function getCodeVerifier(): string {
4 | const randomData = NSMutableData.dataWithLength(SHA256_DIGEST_LENGTH);
5 | const result: number = SecRandomCopyBytes(kSecRandomDefault, randomData.length, randomData.mutableBytes);
6 | if (result !== 0) {
7 | return null;
8 | } else {
9 | return encodeBase64urlNoPadding(randomData);
10 | }
11 | }
12 |
13 | export function sha256base64encoded(inputString: string): string {
14 | const verifierData: NSData = NSString.stringWithString(inputString).dataUsingEncoding(NSUTF8StringEncoding);
15 | const sha256Verifier: NSMutableData = NSMutableData.dataWithLength(SHA256_DIGEST_LENGTH);
16 | CC_SHA256(verifierData.bytes, verifierData.length, sha256Verifier.mutableBytes);
17 | return encodeBase64urlNoPadding(sha256Verifier);
18 | }
19 |
20 | function encodeBase64urlNoPadding(data: NSData): string {
21 | let base64string = data.base64EncodedStringWithOptions(0);
22 | // converts base64 to base64url
23 | base64string = base64string.replace(/\+/g, "-");
24 | base64string = base64string.replace(/\//g, "_");
25 | // strips padding
26 | base64string = base64string.replace(/=/g, "");
27 | return base64string;
28 | }
--------------------------------------------------------------------------------
/src/platforms/android/include.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | api 'com.android.support:customtabs:27.0.2'
3 | api 'com.android.support:appcompat-v7:27.0.2'
4 | implementation 'androidx.browser:browser:1.2.0'
5 | }
6 |
--------------------------------------------------------------------------------
/src/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/src/tns-oauth-auth-state.ts:
--------------------------------------------------------------------------------
1 | import { TnsOAuthClientLoginBlock } from "./index";
2 |
3 | export class TnsOAuthState {
4 | private _loginCompletion: TnsOAuthClientLoginBlock;
5 | private _codeVerifier: string;
6 | private _urlScheme: string;
7 | private _isLogout: boolean;
8 |
9 | public authCode: string;
10 |
11 | public get loginCompletion(): TnsOAuthClientLoginBlock {
12 | return this._loginCompletion;
13 | }
14 |
15 | public get codeVerifier(): string {
16 | return this._codeVerifier;
17 | }
18 |
19 | public get urlScheme(): string {
20 | return this._urlScheme;
21 | }
22 |
23 | public get isLogout(): boolean {
24 | return this._isLogout;
25 | }
26 |
27 | constructor(
28 | codeVerifier: string,
29 | isLogout: boolean,
30 | loginCompletion?: TnsOAuthClientLoginBlock,
31 | urlScheme?: string
32 | ) {
33 | this._loginCompletion = loginCompletion;
34 | this._codeVerifier = codeVerifier;
35 | this._urlScheme = urlScheme;
36 | this._isLogout = isLogout;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/tns-oauth-native-view-controller.android.ts:
--------------------------------------------------------------------------------
1 | import { Application, Color, Frame } from "@nativescript/core";
2 |
3 | import {
4 | TnsOAuthClient,
5 | ITnsOAuthTokenResult,
6 | TnsOAuthClientLogoutBlock,
7 | } from "./index";
8 | import { TnsOAuthClientLoginBlock } from "./index";
9 | import {
10 | ITnsOAuthLoginController,
11 | TnsOAuthLoginSubController,
12 | } from "./tns-oauth-login-sub-controller";
13 |
14 | declare let android, global: any;
15 |
16 | function useAndroidX() {
17 | return global.androidx && global.androidx.appcompat;
18 | }
19 |
20 | const customtabs = useAndroidX()
21 | ? androidx.browser?.customtabs
22 | : android.support.customtabs;
23 |
24 | export class TnsOAuthLoginNativeViewController
25 | implements ITnsOAuthLoginController {
26 | private loginController: TnsOAuthLoginSubController = null;
27 |
28 | public static initWithClient(client: TnsOAuthClient) {
29 | const instance = new TnsOAuthLoginNativeViewController();
30 | if (instance) {
31 | instance.loginController = new TnsOAuthLoginSubController(client);
32 | }
33 | return instance;
34 | }
35 |
36 | public loginWithParametersFrameCompletion(
37 | parameters,
38 | frame: Frame,
39 | urlScheme?: string,
40 | completion?: TnsOAuthClientLoginBlock
41 | ) {
42 | const fullUrl = this.loginController.preLoginSetup(
43 | frame,
44 | urlScheme,
45 | completion
46 | );
47 |
48 | this.openUrlWithParametersCompletion(fullUrl, frame);
49 | }
50 |
51 | public logoutWithParametersFrameCompletion(
52 | parameters,
53 | frame: Frame,
54 | urlScheme?: string,
55 | completion?: TnsOAuthClientLogoutBlock
56 | ) {
57 | const fullUrl = this.loginController.preLogoutSetup(
58 | frame,
59 | urlScheme,
60 | completion
61 | );
62 |
63 | this.openUrlWithParametersCompletion(fullUrl, frame);
64 | }
65 |
66 | private openUrlWithParametersCompletion(fullUrl: string, frame: Frame): void {
67 | const builder = new customtabs.CustomTabsIntent.Builder();
68 | builder.setToolbarColor(new Color("#335da0").android);
69 | builder.setShowTitle(true);
70 | const customTabsIntent = builder.build();
71 | customTabsIntent.launchUrl(
72 | Application.android.startActivity,
73 | android.net.Uri.parse(fullUrl)
74 | );
75 | }
76 |
77 | public resumeWithUrl(url: string): boolean {
78 | if (!!url) {
79 | return this.loginController.resumeWithUrl(
80 | url,
81 | (tokenResult: ITnsOAuthTokenResult, error) => {
82 | this.loginController.completeLoginWithTokenResponseError(
83 | tokenResult,
84 | error
85 | );
86 | }
87 | );
88 | } else {
89 | const er = "The login operation was canceled.";
90 | this.loginController.completeLoginWithTokenResponseError(null, er);
91 | return true;
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/src/tns-oauth-native-view-controller.d.ts:
--------------------------------------------------------------------------------
1 | import { Frame } from "@nativescript/core";
2 |
3 | import { ITnsOAuthLoginController } from "./tns-oauth-login-sub-controller";
4 | import { TnsOAuthClient, TnsOAuthClientLoginBlock } from "./index";
5 |
6 | export declare class TnsOAuthLoginNativeViewController
7 | implements ITnsOAuthLoginController {
8 | static initWithClient(client: TnsOAuthClient);
9 | loginWithParametersFrameCompletion(
10 | parameters: any,
11 | frame: Frame,
12 | urlScheme?: string,
13 | completion?: TnsOAuthClientLoginBlock
14 | );
15 | resumeWithUrl(url: string);
16 | }
17 |
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2017",
4 | "module": "esnext",
5 | "moduleResolution": "node",
6 | "declaration": false,
7 | "removeComments": true,
8 | "noLib": false,
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "skipLibCheck": true,
12 | "lib": ["es2017", "dom"],
13 | "sourceMap": true,
14 | "pretty": true,
15 | "allowUnreachableCode": false,
16 | "allowUnusedLabels": false,
17 | "noEmitHelpers": true,
18 | "noEmitOnError": false,
19 | "noImplicitAny": false,
20 | "noImplicitReturns": true,
21 | "noImplicitUseStrict": false,
22 | "noFallthroughCasesInSwitch": true,
23 | "plugins": [
24 | {
25 | "transform": "@nativescript/webpack/transformers/ns-transform-native-classes",
26 | "type": "raw"
27 | }
28 | ]
29 | },
30 | "exclude": ["node_modules"],
31 | "compileOnSave": false
32 | }
33 |
--------------------------------------------------------------------------------
/src/types/android.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace android {
2 | export namespace support {
3 | export namespace customtabs {
4 | export class CustomTabsIntent {
5 | launchUrl(context: android.content.Context, url: android.net.Uri): void;
6 | }
7 | namespace CustomTabsIntent {
8 | export class Builder {
9 | constructor();
10 | constructor(session: CustomTabsSession);
11 | build(): android.support.customtabs.CustomTabsIntent;
12 | setShowTitle(showTitle: boolean): this;
13 | setToolbarColor(color: number): this;
14 | addDefaultShareMenuItem(): this;
15 | enableUrlBarHiding(): this;
16 | }
17 | }
18 |
19 | interface ICustomTabsServiceConnection {
20 | onCustomTabsServiceConnected(
21 | name: android.content.ComponentName,
22 | client: CustomTabsClient
23 | ): void;
24 | onServiceDisconnected(name: android.content.ComponentName): void;
25 | }
26 |
27 | export class CustomTabsServiceConnection {
28 | constructor();
29 | static extend(
30 | implementation: ICustomTabsServiceConnection
31 | ): T;
32 | }
33 |
34 | export class CustomTabsSession { }
35 |
36 | export class CustomTabsClient {
37 | warmup(flags: number): boolean;
38 | newSession(callback: any): CustomTabsSession;
39 |
40 | static bindCustomTabsService(
41 | context: android.content.Context,
42 | packageName: String,
43 | connection: CustomTabsServiceConnection
44 | ): boolean;
45 | }
46 | }
47 | }
48 | }
49 |
50 | declare namespace androidx {
51 | export namespace browser {
52 | export namespace customtabs {
53 | export class CustomTabsIntent {
54 | launchUrl(context: android.content.Context, url: android.net.Uri): void;
55 | }
56 | namespace CustomTabsIntent {
57 | export class Builder {
58 | constructor();
59 | constructor(session: CustomTabsSession);
60 | build(): androidx.browser.customtabs.CustomTabsIntent;
61 | setShowTitle(showTitle: boolean): this;
62 | setToolbarColor(color: number): this;
63 | addDefaultShareMenuItem(): this;
64 | enableUrlBarHiding(): this;
65 | }
66 | }
67 |
68 | interface ICustomTabsServiceConnection {
69 | onCustomTabsServiceConnected(
70 | name: android.content.ComponentName,
71 | client: CustomTabsClient
72 | ): void;
73 | onServiceDisconnected(name: android.content.ComponentName): void;
74 | }
75 |
76 | export class CustomTabsServiceConnection {
77 | constructor();
78 | static extend(
79 | implementation: ICustomTabsServiceConnection
80 | ): T;
81 | }
82 |
83 | export class CustomTabsSession { }
84 |
85 | export class CustomTabsClient {
86 | warmup(flags: number): boolean;
87 | newSession(callback: any): CustomTabsSession;
88 |
89 | static bindCustomTabsService(
90 | context: android.content.Context,
91 | packageName: String,
92 | connection: CustomTabsServiceConnection
93 | ): boolean;
94 | }
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "class-name": true,
4 | "comment-format": [
5 | true,
6 | "check-space"
7 | ],
8 | "indent": [
9 | true,
10 | "spaces"
11 | ],
12 | "no-duplicate-variable": true,
13 | "no-eval": true,
14 | "no-internal-module": true,
15 | "no-trailing-whitespace": true,
16 | "no-var-keyword": true,
17 | "one-line": [
18 | true,
19 | "check-open-brace",
20 | "check-whitespace"
21 | ],
22 | "quotemark": [
23 | false,
24 | "double"
25 | ],
26 | "semicolon": [
27 | true,
28 | "always"
29 | ],
30 | "triple-equals": [
31 | true,
32 | "allow-null-check"
33 | ],
34 | "typedef-whitespace": [
35 | true,
36 | {
37 | "call-signature": "nospace",
38 | "index-signature": "nospace",
39 | "parameter": "nospace",
40 | "property-declaration": "nospace",
41 | "variable-declaration": "nospace"
42 | }
43 | ],
44 | "variable-name": [
45 | true,
46 | "ban-keywords"
47 | ],
48 | "whitespace": [
49 | true,
50 | "check-branch",
51 | "check-decl",
52 | "check-operator",
53 | "check-separator",
54 | "check-type"
55 | ]
56 | }
57 | }
--------------------------------------------------------------------------------