Skip to content

Commit 5841091

Browse files
* oauth url update * yarn fix * node engine update * circle ci change * update node engine * update node engine * package change * package update * package update * circle update * circle update * package update
1 parent c334ef7 commit 5841091

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ jobs:
33
build:
44
working_directory: ~/tableau-connector
55
docker:
6-
- image: circleci/node:8.9.4
6+
- image: circleci/node:14.18.2
77
steps:
88
- checkout
99
- restore_cache:
1010
key: dependency-cache-{{ checksum "package.json" }}
1111
- run:
1212
name: Install dependencies
13-
command: yarn install --frozen-lockfile
13+
command: yarn install
1414
- save_cache:
1515
key: dependency-cache-{{ checksum "package.json" }}
1616
paths:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ issues and propose changes to the current or next version of the data.world Web
2525

2626
The connector uses `data.world`'s [OAuth 2.0 flow for native applications](https://apidocs.data.world/v0/data-world-for-developers/oauth#native-applications-desktop-mobile-static-sites-other)
2727

28-
After determining it is running in a Tableau environment the app redirects to `https://data.world/oauth/authorize` supplying the following as query params:
28+
After determining it is running in a Tableau environment the app redirects to `https://auth.data.world/oauth/authorize` supplying the following as query params:
2929
* client_id
3030
* redirect_uri
3131
* response_type
3232
* code_challenge_method
3333
* code_challenge
3434

35-
The user is asked to log in to `data.word` and authorize the application. If successful the app redirects to the provided `redirect_uri` with a `code` query param.
35+
The user is asked to select and log in to `data.word` instance and authorize the application. If successful the app redirects to the provided `redirect_uri` with a `code` query param.
3636

3737
The app then makes a `POST` request to `https://data.world/oauth/access_token` providing the following in the body of the request:
3838
* The `code` returned

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ To enable scheduled refreshes for extracts created from data.world WDC, we'll ne
4343

4444
2. tabadmin whitelist_webdataconnector -a https://tableau.data.world:443
4545

46-
3. tabadmin whitelist_webdataconnector -s https://tableau.data.world:443 https://api.data.world/(.*),https://query.data.world/(.*),https://data.world/oauth/(.*)
46+
3. tabadmin whitelist_webdataconnector -s https://tableau.data.world:443 https://api.data.world/(.*),https://query.data.world/(.*),https://data.world/oauth/(.*),https://auth.data.world/oauth/(.*)
4747

4848
4. tabadmin restart
4949

5050
For more info see [tabadmin Commands](https://onlinehelp.tableau.com/v10.5/server/en-us/tabadmin_cmd.htm#whitelist_wdc)
5151

5252
B. To configure safe list for Tableau Server version 2018.1 and above run the following commands on the machine
5353

54-
1. tsm data-access web-data-connectors add --name 'DW WDC' --url https://tableau.data.world:443 --secondary https://api.data.world/*, https://query.data.world/*, https://data.world/oauth/*
54+
1. tsm data-access web-data-connectors add --name 'DW WDC' --url https://tableau.data.world:443 --secondary https://api.data.world/*, https://query.data.world/*, https://data.world/oauth/*, https://auth.data.world/oauth/*
5555

5656
2. tsm data-access web-data-connectors allow
5757

@@ -67,4 +67,4 @@ If you'd like to contribute, please follow the [Contributing Guidelines](CONTRIB
6767

6868
## License
6969

70-
Apache License 2.0
70+
Apache License 2.0

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"engines": {
6-
"node": "8.9.4"
6+
"node": "14.18.2"
77
},
88
"dependencies": {
99
"@sentry/browser": "4.1.1",
@@ -15,6 +15,7 @@
1515
"react": "15.6.2",
1616
"react-bootstrap": "0.30.7",
1717
"react-dom": "15.6.2",
18+
"react-scripts": "0.9.5",
1819
"serve": "10.0.0",
1920
"uuid": "3.3.2"
2021
},
@@ -29,7 +30,6 @@
2930
"eslint-plugin-promise": "3.7.0",
3031
"eslint-plugin-react": "7.8.2",
3132
"eslint-plugin-standard": "3.1.0",
32-
"react-scripts": "0.9.5",
3333
"react-test-renderer": "15.4.2"
3434
},
3535
"scripts": {

src/auth.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { parseJSON } from './util.js'
2323

2424
const apiTokenKey = 'DW-API-KEY'
2525
const codeVerifierKey = 'DW-CODE-VERIFIER'
26+
const oAuthBaseSite = process.env.REACT_APP_AUTH_SITE || 'https://auth.data.world'
2627

2728
const generateCodeVerifier = () => {
2829
const lowerCase = 'abcdefghijklmnopqrstuvwxyz'
@@ -119,7 +120,7 @@ const getAuthUrl = (codeVerifier, state) => {
119120
const agentid = dataset_name.split('/')[0]
120121
const agentidParam = agentid ? `&agentid=${agentid}` : ''
121122

122-
return `${process.env.REACT_APP_BASE_SITE}/oauth/authorize?client_id=${process.env.REACT_APP_OAUTH_CLIENT_ID}` +
123+
return `${oAuthBaseSite}/oauth/authorize?client_id=${process.env.REACT_APP_OAUTH_CLIENT_ID}` +
123124
`&redirect_uri=${process.env.REACT_APP_OAUTH_REDIRECT_URI}` +
124125
`&response_type=code&code_challenge_method=S256&code_challenge=${codeChallenge}` +
125126
`${agentidParam}` +

0 commit comments

Comments
 (0)