Skip to content

Commit

Permalink
Merge dynamic to main (#634)
Browse files Browse the repository at this point in the history
Co-authored-by: Asaf Shen <[email protected]>
Co-authored-by: Nitzan Peretz <[email protected]>
Co-authored-by: Omer C <[email protected]>
Co-authored-by: Nir Gur Arie <[email protected]>
Co-authored-by: nirgur <[email protected]>
Co-authored-by: Tom Kaminski <[email protected]>
Co-authored-by: Kevin J Gao <[email protected]>
Co-authored-by: Doron Sharon <[email protected]>
Co-authored-by: Nicolas Macian <[email protected]>
Co-authored-by: Itai Hanski <[email protected]>
Co-authored-by: GuyP <[email protected]>
  • Loading branch information
12 people authored Dec 9, 2024
1 parent 6504249 commit 3865b15
Show file tree
Hide file tree
Showing 10 changed files with 3,923 additions and 3,269 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- main

env:
NODE_VERSION: 18
AWS_ACCOUNT_DEVOPS: ${{ secrets.ECR_AWS_ACCOUNT_ID }}
AWS_ROLE: GithubActions
AWS_REGION: ${{ secrets.ECR_AWS_REGION }}
Expand All @@ -18,14 +19,15 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version-file: package.json
node-version-file: .nvmrc
cache-dependency-path: '**/yarn.lock'
- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install
env:
CI: true
- name: Building
run: yarn build

Expand All @@ -35,18 +37,21 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version-file: package.json
node-version-file: .nvmrc
cache-dependency-path: '**/yarn.lock'
- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install
env:
CI: true
- name: Checking format
run: yarn format-check
run: |
yarn format-check
- name: Checking lint
run: yarn lint
run: |
yarn lint
testing:
name: 👔 Test & Coverage
Expand All @@ -56,14 +61,15 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version-file: package.json
node-version-file: .nvmrc
cache-dependency-path: '**/yarn.lock'
- name: Install dependencies
run: yarn install
env:
CI: true
- name: Testing
run: yarn run test
- name: Coverage check
Expand All @@ -80,7 +86,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
cache: 'yarn'
Expand All @@ -89,6 +94,9 @@ jobs:
registry-url: https://npm.pkg.github.com/
- name: Install dependencies
run: yarn install
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }}
- name: License validation
shell: bash
run: ./thirdPartyLicenseCollector_linux_amd64 -npm-project .
Expand All @@ -111,15 +119,7 @@ jobs:
uses: actions/checkout@v4
- name: Create docker ignore
run: |
corepack enable
cp .gitignore .dockerignore
echo NODE_VERSION=$(node -e 'console.log(process.versions.node.split(".")[0])') >> $GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version-file: package.json
cache-dependency-path: '**/yarn.lock'
- name: Login to GHCR
uses: docker/login-action@v3
with:
Expand All @@ -145,15 +145,15 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
context: .
push: true
build-args: |
NODE_VERSION=${{ env.NODE_VERSION }}
NODE_AUTH_TOKEN=${{ secrets.CI_NPM_READ_ORG }}
tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }}
labels: |
${{ steps.meta.outputs.labels }}
org.opencontainers.image.description=${{ steps.meta.outputs.description}}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vercel
.env
.bom
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
lts/*
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# syntax=docker/dockerfile:1
ARG NODE_VERSION=18

FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-alpine as builder
FROM node:${NODE_VERSION}-alpine as builder
ENV NODE_ENV=production

WORKDIR /app
COPY ["package.json", "yarn.lock*", "./"]

RUN yarn install --production=false --frozen-lockfile
RUN yarn install --production=false
COPY . .
ARG REACT_APP_DESCOPE_BASE_URL=""
ARG REACT_APP_CONTENT_BASE_URL=""
ARG REACT_APP_USE_ORIGIN_BASE_URL="true"
RUN yarn build

FROM --platform=$TARGETPLATFORM nginx:alpine
FROM nginx:alpine

RUN apk add openssl && \
openssl req -x509 -nodes -days 365 -subj "/C=CA/ST=QC/O=Company, Inc./CN=mydomain.com" -addext "subjectAltName=DNS:mydomain.com" -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt;
Expand All @@ -27,7 +27,7 @@ server {
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
server_name localhost;

rewrite ^/login(.*)$ $1 last;
rewrite ^/login/(.*)$ /$1 last;

location / {
root /usr/share/nginx/html;
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ You can refer to either the [main documentation](https://docs.descope.com/custom

These are the different query parameters you can use:

1. `<PROJECT_ID>` as part of the URL path is required to use the desired Descope's `PROJECT_ID`.
1. `<PROJECT_ID>` as part of the URL path is required to use the desired Descope's `PROJECT_ID`

2. `flow` query parameter is optional. If none provided the default flow is `sign-up-or-in`.
2. `flow` query parameter is optional. If none provided the default flow is `sign-up-or-in`

3. `tenant` query parameter is optional. You can input a **Tenant ID** or **Tenant Domain** to use with this query parameter (e.g. `tenant=descope.com` or `tenant=T2UjlUN1tJsRnrV3jnAkJ3WziaEq`).

> If present, then you will be able to authenticate via SSO, without having to first specify an email with an input screen in your flow.
4. `debug` query parameter is optional. If debug mode is needed use `debug=true`.
4. `debug`query parameter is optional. If debug mode is needed use`debug=true`

5. `bg` query parameter is optional. If you wish to use a different background color, you can use this parameter. (ex. `bg=black` or `bg=gray`)

Expand Down
6 changes: 6 additions & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// config-overrides.js
module.exports = function override(config, env) {
// New config, e.g. config.plugins.push...
delete config.module.rules[1].oneOf[3].include;
return config;
};
91 changes: 44 additions & 47 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,61 @@
"private": true,
"dependencies": {
"@descope/react-sdk": "2.3.4",
"@emotion/react": "11.13.3",
"@emotion/styled": "11.13.0",
"@mui/icons-material": "5.16.7",
"@mui/material": "5.16.7",
"clsx": "2.1.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"usehooks-ts": "2.16.0",
"web-vitals": "3.5.2"
"@emotion/react": "11.11.3",
"@emotion/styled": "11.11.0",
"@mui/icons-material": "5.15.4",
"@mui/material": "5.15.4",
"clsx": "2.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"rfdc": "^1.3.0",
"usehooks-ts": "2.9.4",
"web-vitals": "3.5.1"
},
"devDependencies": {
"@babel/core": "^7.24.3",
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@babel/preset-env": "7.26.0",
"@babel/preset-react": "7.25.9",
"@babel/preset-env": "7.23.8",
"@babel/preset-react": "7.23.3",
"@craco/craco": "^7.1.0",
"@craco/types": "^7.1.0",
"@cyclonedx/webpack-plugin": "^3.9.2",
"@testing-library/dom": "^10.0.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.0.1",
"@cyclonedx/webpack-plugin": "^3.8.3",
"@testing-library/jest-dom": "6.2.0",
"@testing-library/react": "14.1.2",
"@testing-library/user-event": "14.5.2",
"@types/babel__core": "^7",
"@types/jest": "29.5.14",
"@types/node": "22.7.6",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"@types/jest": "29.5.11",
"@types/node": "20.11.0",
"@types/react": "18.2.47",
"@types/react-dom": "18.2.18",
"@typescript-eslint/eslint-plugin": "6.18.1",
"@typescript-eslint/parser": "6.18.1",
"babel-plugin-transform-export-extensions": "6.22.0",
"eslint": "8.57.1",
"eslint": "8.56.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-standard": "17.1.0",
"eslint-import-resolver-typescript": "3.6.3",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest": "28.9.0",
"eslint-plugin-jest-dom": "5.5.0",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jest": "27.6.3",
"eslint-plugin-jest-dom": "5.1.0",
"eslint-plugin-jest-formatting": "3.1.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-n": "17.13.2",
"eslint-plugin-no-only-tests": "3.3.0",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-n": "16.6.2",
"eslint-plugin-no-only-tests": "3.1.0",
"eslint-plugin-prefer-arrow": "1.2.3",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-promise": "7.1.0",
"eslint-plugin-react": "7.37.2",
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-security": "1.7.1",
"eslint-plugin-testing-library": "6.4.0",
"husky": "9.1.6",
"eslint-plugin-testing-library": "6.2.0",
"husky": "8.0.3",
"jest": "29.7.0",
"lint-staged": "15.2.10",
"prettier": "3.3.3",
"lint-staged": "15.2.0",
"prettier": "3.2.2",
"react-app-rewired": "^2.2.1",
"react-scripts": "5.0.1",
"typescript": "<5.6.4",
"webpack": "^5.91.0"
"typescript": "<5.3.4"
},
"scripts": {
"prepare": "husky install",
Expand All @@ -70,9 +68,9 @@
"lint:ci": "eslint . --max-warnings 0",
"lint": "eslint --fix --max-warnings 0",
"lint:all": "yarn run lint .",
"start": "craco start",
"build": "craco build",
"test": "craco test --coverage",
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-scripts test --coverage",
"eject": "react-scripts eject"
},
"lint-staged": {
Expand Down Expand Up @@ -102,9 +100,8 @@
]
},
"engines": {
"node": "^18"
"yarn": ">=1.22.0"
},
"packageManager": "[email protected]",
"homepage": "login",
"jest": {
"collectCoverageFrom": [
Expand Down
Loading

0 comments on commit 3865b15

Please sign in to comment.