casdoor 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yaml +8 -4
- package/package.json +6 -6
- package/src/oauth.js +5 -3
|
@@ -3,17 +3,22 @@ on:
|
|
|
3
3
|
push:
|
|
4
4
|
branches:
|
|
5
5
|
- master
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
issues: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
id-token: write
|
|
6
11
|
jobs:
|
|
7
12
|
release:
|
|
8
13
|
name: Release
|
|
9
14
|
runs-on: ubuntu-latest
|
|
10
15
|
steps:
|
|
11
16
|
- name: Checkout
|
|
12
|
-
uses: actions/checkout@
|
|
17
|
+
uses: actions/checkout@v4
|
|
13
18
|
- name: Setup Node
|
|
14
|
-
uses: actions/setup-node@
|
|
19
|
+
uses: actions/setup-node@v4
|
|
15
20
|
with:
|
|
16
|
-
node-version: '
|
|
21
|
+
node-version: '24'
|
|
17
22
|
- name: Install
|
|
18
23
|
run: yarn install
|
|
19
24
|
- name: Release
|
|
@@ -21,4 +26,3 @@ jobs:
|
|
|
21
26
|
run: yarn semantic-release
|
|
22
27
|
env:
|
|
23
28
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
24
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "casdoor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "The Casdoor extension can help browser users automatically log into applications protected by Casdoor single-sign-on (SSO) system.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/casdoor/casdoor-chrome-extension.git"
|
|
8
|
+
},
|
|
5
9
|
"scripts": {
|
|
6
10
|
"semantic-release": "semantic-release"
|
|
7
11
|
},
|
|
8
12
|
"devDependencies": {
|
|
9
|
-
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
10
|
-
"@semantic-release/git": "^10.0.1",
|
|
11
|
-
"@semantic-release/github": "^8.0.6",
|
|
12
|
-
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
13
13
|
"eslint": "^8.21.0",
|
|
14
14
|
"eslint-config-standard": "^17.0.0",
|
|
15
15
|
"eslint-plugin-import": "^2.26.0",
|
|
16
16
|
"eslint-plugin-n": "^15.2.4",
|
|
17
17
|
"eslint-plugin-promise": "^6.0.0",
|
|
18
|
-
"semantic-release": "^
|
|
18
|
+
"semantic-release": "^25.0.9"
|
|
19
19
|
}
|
|
20
20
|
}
|
package/src/oauth.js
CHANGED
|
@@ -119,9 +119,11 @@ let accessToken;
|
|
|
119
119
|
let applicationName;
|
|
120
120
|
|
|
121
121
|
function getDomAccessToken() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
const accessTokenDom = document.getElementById("CasdoorAccessToken")
|
|
123
|
+
const applicationNameDom = document.getElementById("CasdoorApplicationName")
|
|
124
|
+
if(window.location.pathname != "/src/popup.html" && accessTokenDom && applicationNameDom){
|
|
125
|
+
accessToken = accessTokenDom.getAttribute("value");
|
|
126
|
+
applicationName = applicationNameDom.getAttribute("value");
|
|
125
127
|
if (accessToken && applicationName) {
|
|
126
128
|
sdk.getUserProfile(accessToken).then((userProfile) => {
|
|
127
129
|
userProfile.applicationName = applicationName;
|