2 |
Angular 快速集成 Authing Demo
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/examples/web/sso/vue3/website1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "website1",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "@authing/web": "^5.1.8",
12 | "core-js": "^3.6.5",
13 | "vue": "^3.0.0"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "~4.5.15",
17 | "@vue/cli-plugin-eslint": "~4.5.15",
18 | "@vue/cli-service": "~4.5.15",
19 | "@vue/compiler-sfc": "^3.0.0",
20 | "@vue/eslint-config-prettier": "^6.0.0",
21 | "babel-eslint": "^10.1.0",
22 | "eslint": "^6.7.2",
23 | "eslint-plugin-prettier": "^3.3.1",
24 | "eslint-plugin-vue": "^7.0.0",
25 | "prettier": "^2.2.1"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/examples/web/sso/vue3/website2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "website2",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "@authing/web": "^5.1.8",
12 | "core-js": "^3.6.5",
13 | "vue": "^3.0.0"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "~4.5.15",
17 | "@vue/cli-plugin-eslint": "~4.5.15",
18 | "@vue/cli-service": "~4.5.15",
19 | "@vue/compiler-sfc": "^3.0.0",
20 | "@vue/eslint-config-prettier": "^6.0.0",
21 | "babel-eslint": "^10.1.0",
22 | "eslint": "^6.7.2",
23 | "eslint-plugin-prettier": "^3.3.1",
24 | "eslint-plugin-vue": "^7.0.0",
25 | "prettier": "^2.2.1"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/examples/web/spa/vue/vue3/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue3",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "@authing/web": "^5.0.2-alpha.12",
12 | "core-js": "^3.6.5",
13 | "vue": "^3.0.0"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "~4.5.15",
17 | "@vue/cli-plugin-eslint": "~4.5.15",
18 | "@vue/cli-service": "~4.5.15",
19 | "@vue/compiler-sfc": "^3.0.0",
20 | "@vue/eslint-config-prettier": "^6.0.0",
21 | "babel-eslint": "^10.1.0",
22 | "eslint": "^6.7.2",
23 | "eslint-plugin-prettier": "^3.3.1",
24 | "eslint-plugin-vue": "^7.0.0",
25 | "prettier": "^2.2.1"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/examples/web/sso/vue2/website1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "website1",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "@authing/web": "^5.1.8",
12 | "core-js": "^3.6.5",
13 | "vue": "^2.6.11"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "~4.5.15",
17 | "@vue/cli-plugin-eslint": "~4.5.15",
18 | "@vue/cli-service": "~4.5.15",
19 | "@vue/eslint-config-prettier": "^6.0.0",
20 | "babel-eslint": "^10.1.0",
21 | "eslint": "^6.7.2",
22 | "eslint-plugin-prettier": "^3.3.1",
23 | "eslint-plugin-vue": "^6.2.2",
24 | "prettier": "^2.2.1",
25 | "vue-template-compiler": "^2.6.11"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/examples/web/sso/vue2/website2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "website2",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "@authing/web": "^5.1.8",
12 | "core-js": "^3.6.5",
13 | "vue": "^2.6.11"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "~4.5.15",
17 | "@vue/cli-plugin-eslint": "~4.5.15",
18 | "@vue/cli-service": "~4.5.15",
19 | "@vue/eslint-config-prettier": "^6.0.0",
20 | "babel-eslint": "^10.1.0",
21 | "eslint": "^6.7.2",
22 | "eslint-plugin-prettier": "^3.3.1",
23 | "eslint-plugin-vue": "^6.2.2",
24 | "prettier": "^2.2.1",
25 | "vue-template-compiler": "^2.6.11"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/packages/weixin-official-account/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": ".",
4 | "rootDir": "src",
5 | "outDir": "dist",
6 | "target": "es5",
7 | "lib": ["dom", "esnext"],
8 | "allowJs": false,
9 | "skipLibCheck": true,
10 | "esModuleInterop": true,
11 | "allowSyntheticDefaultImports": true,
12 | "strict": true,
13 | "forceConsistentCasingInFileNames": true,
14 | "noFallthroughCasesInSwitch": true,
15 | "module": "esnext",
16 | "moduleResolution": "node",
17 | "resolveJsonModule": true,
18 | "declaration": true,
19 | "declarationDir": "./dist/typings",
20 | "noEmit": false,
21 | "downlevelIteration": true
22 | },
23 | "include": [
24 | "src/**/*.ts"
25 | ],
26 | "exclude": [
27 | "node_modules",
28 | "dist"
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/examples/web/spa/vue/vue2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "spa-demo-vue2",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "@authing/web": "^5.0.2-alpha.12",
12 | "core-js": "^3.6.5",
13 | "vue": "^2.6.11"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "~4.5.15",
17 | "@vue/cli-plugin-eslint": "~4.5.15",
18 | "@vue/cli-service": "~4.5.15",
19 | "@vue/eslint-config-prettier": "^6.0.0",
20 | "babel-eslint": "^10.1.0",
21 | "eslint": "^6.7.2",
22 | "eslint-plugin-prettier": "^3.3.1",
23 | "eslint-plugin-vue": "^6.2.2",
24 | "prettier": "^2.2.1",
25 | "vue-template-compiler": "^2.6.11"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/examples/web/sso/angular/website1/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
{{ title }}
3 |
4 |
5 | redirect to website2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/packages/miniapp-tt/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@authing/miniapp-tt",
3 | "version": "5.1.21",
4 | "description": "Authing miniapp JS SDK for TT",
5 | "main": "dist/bundle-tt.js",
6 | "types": "dist/typings/src/index.d.ts",
7 | "author": "https://github.com/authing",
8 | "license": "MIT",
9 | "files": [
10 | "dist"
11 | ],
12 | "scripts": {
13 | "release:official": "npm publish --verbose --access public",
14 | "release:alpha": "npm publish --verbose --tag=alpha --access public"
15 | },
16 | "publishConfig": {
17 | "access": "public",
18 | "registry": "https://registry.npmjs.org"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/authing/authing-js-sdk"
23 | },
24 | "bugs": {
25 | "url": "https://github.com/authing/authing-js-sdk/issues"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/packages/miniapp-wx/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@authing/miniapp-wx",
3 | "version": "5.1.21",
4 | "description": "Authing miniapp JS SDK for WX",
5 | "main": "dist/bundle-wx.js",
6 | "types": "dist/typings/src/index.d.ts",
7 | "author": "https://github.com/authing",
8 | "license": "MIT",
9 | "files": [
10 | "dist"
11 | ],
12 | "scripts": {
13 | "release:official": "npm publish --verbose --access public",
14 | "release:alpha": "npm publish --verbose --tag=alpha --access public"
15 | },
16 | "publishConfig": {
17 | "access": "public",
18 | "registry": "https://registry.npmjs.org"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/authing/authing-js-sdk"
23 | },
24 | "bugs": {
25 | "url": "https://github.com/authing/authing-js-sdk/issues"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/packages/miniapp-taro/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@authing/miniapp-taro",
3 | "version": "5.1.21",
4 | "description": "Authing miniapp JS SDK for Taro",
5 | "main": "dist/bundle-taro.js",
6 | "types": "dist/typings/src/index.d.ts",
7 | "author": "https://github.com/authing",
8 | "license": "MIT",
9 | "files": [
10 | "dist"
11 | ],
12 | "scripts": {
13 | "release:official": "npm publish --verbose --access public",
14 | "release:alpha": "npm publish --verbose --tag=alpha --access public"
15 | },
16 | "publishConfig": {
17 | "access": "public",
18 | "registry": "https://registry.npmjs.org"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/authing/authing-js-sdk"
23 | },
24 | "bugs": {
25 | "url": "https://github.com/authing/authing-js-sdk/issues"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/packages/miniapp/src/helpers/StorageProvider.ts:
--------------------------------------------------------------------------------
1 | import {
2 | GetStorageCallbackData,
3 | RemoveStorageFailData,
4 | RemoveStorageSuccessData,
5 | SetStorageCallbackData
6 | } from '@authing/authingmove-core'
7 |
8 | import { AuthingMove } from '../AuthingMove'
9 |
10 | import { IStorageProvider } from '../types'
11 |
12 | export class StorageProvider implements IStorageProvider {
13 | get(key: string): Promise