Skip to content

Commit edc29f6

Browse files
authored
Add oauth providers (#220)
1 parent 28da600 commit edc29f6

10 files changed

Lines changed: 14 additions & 20 deletions

File tree

.github/workflows/reusable-typescript.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ jobs:
6464
uses: actions/setup-node@v6
6565
with:
6666
node-version: ${{ inputs.node-version }}
67-
cache: npm
68-
cache-dependency-path: ${{ inputs.working-directory }}/package-lock.json
6967

7068
- name: Install dependencies
7169
run: |

.github/workflows/ts-code-style.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ jobs:
5959
uses: actions/setup-node@v6
6060
with:
6161
node-version: '22'
62-
cache: npm
63-
cache-dependency-path: package-lock.json
6462

6563
- name: Install dependencies
6664
run: |

.github/workflows/ts-typing.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ jobs:
4545
uses: actions/setup-node@v6
4646
with:
4747
node-version: '22'
48-
cache: npm
49-
cache-dependency-path: package-lock.json
5048

5149
- name: Install dependencies
5250
run: |

datalayer_core/_pydoc/replace_renderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class MyDocusaurusRenderer(Renderer):
112112
Custom Docusaurus renderer for pydoc-markdown.
113113
"""
114114

115-
#: The #MarkdownRenderer configuration.
115+
#: The MarkdownRenderer configuration.
116116
markdown: te.Annotated[
117117
MarkdownRenderer, DeserializeAs(CustomizedMarkdownRenderer)
118118
] = dataclasses.field(default_factory=CustomizedMarkdownRenderer)

docs/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
"@tsconfig/docusaurus": "^2.0.3",
3636
"cross-env": "^7.0.3"
3737
},
38+
"overrides": {
39+
"webpackbar": "^7.0.0"
40+
},
3841
"browserslist": {
3942
"production": [
4043
">0.5%",

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source "${HOME}/.cargo/env" && \
55
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba && \
66
export MAMBA_ROOT_PREFIX="${HOME}/micromamba" && \
77
eval "$(./bin/micromamba shell hook -s posix)" && \
8-
micromamba create -n datalayer make python=3.11 nodejs -c conda-forge -y && \
8+
micromamba create -n datalayer make python=3.11 nodejs=22 -c conda-forge -y && \
99
micromamba activate datalayer && \
1010
npm cache clean --force && \
1111
npm install && \

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@
102102
"rebuild:fresh": "npm run create:patches && npm install && npm run build && npm run clean:cache"
103103
},
104104
"dependencies": {
105-
"@datalayer/icons-react": "^1.0.6",
105+
"@datalayer/icons-react": "^1.0.7",
106106
"@datalayer/jupyter-lexical": "^1.0.16",
107107
"@datalayer/jupyter-react": "^2.0.7",
108-
"@datalayer/primer-addons": "^1.0.12",
109-
"@datalayer/primer-rjsf": "^1.0.1",
108+
"@datalayer/primer-addons": "^1.0.15",
109+
"@datalayer/primer-rjsf": "^1.0.3",
110110
"@fluentui/react": "^8.125.3",
111111
"@jupyter-widgets/base-manager": "^1.0.12",
112112
"@jupyter-widgets/schema": "^0.5.6",

src/api/iam/__tests__/oauth2.unit.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ describe('IAM OAuth2 Unit Tests', () => {
2121
it('should only accept valid provider types', () => {
2222
const validProviders: oauth2.OAuth2Provider[] = [
2323
'github',
24+
'google',
2425
'linkedin',
2526
'okta',
2627
];
2728

2829
// This test ensures at compile time that only valid providers are accepted
29-
expect(validProviders).toHaveLength(3);
30+
expect(validProviders).toHaveLength(4);
3031
expect(validProviders).toContain('github');
32+
expect(validProviders).toContain('google');
3133
expect(validProviders).toContain('linkedin');
3234
expect(validProviders).toContain('okta');
3335

src/api/iam/oauth2.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { API_BASE_PATHS, DEFAULT_SERVICE_URLS } from '../constants';
1717
/**
1818
* OAuth2 provider types supported by the platform
1919
*/
20-
export type OAuth2Provider = 'github' | 'linkedin' | 'okta';
20+
export type OAuth2Provider = 'github' | 'google' | 'linkedin' | 'okta';
2121

2222
/**
2323
* Response from the OAuth2 authorization URL endpoint
@@ -46,7 +46,7 @@ export type OAuth2CallbackResponse = string;
4646

4747
/**
4848
* Get the OAuth2 authorization URL for a specific provider
49-
* @param provider - OAuth2 provider (bluesky, github, linkedin, okta)
49+
* @param provider - OAuth2 provider (github, google, linkedin, okta)
5050
* @param callbackUri - Server endpoint to call with the authz token
5151
* @param nonce - Optional nonce for security
5252
* @param baseUrl - Base URL for the API (defaults to production IAM URL)
@@ -121,7 +121,7 @@ export const getOAuth2AuthzUrl = async (
121121

122122
/**
123123
* Get the OAuth2 authorization URL for linking a provider to an existing account
124-
* @param provider - OAuth2 provider (bluesky, github, linkedin, okta)
124+
* @param provider - OAuth2 provider (github, google, linkedin, okta)
125125
* @param callbackUri - Server endpoint to call with the authz token
126126
* @param baseUrl - Base URL for the API (defaults to production IAM URL)
127127
* @returns OAuth2 authorization URL response

src/otel/auth.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
* Distributed under the terms of the Modified BSD License.
44
*/
55

6-
/*
7-
* Copyright (c) 2023-2026 Datalayer, Inc.
8-
* Distributed under the terms of the Modified BSD License.
9-
*/
10-
116
import { getDatalayerJwtUser, parseJwtPayload } from '../utils/Jwt';
127

138
export interface ResolvedOtelAuth {

0 commit comments

Comments
 (0)