Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Added Private Route Array #69

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Added Private Route Array #69

wants to merge 13 commits into from

Conversation

gaokevin1
Copy link
Member

@gaokevin1 gaokevin1 commented Jul 23, 2024

Related Issues

Related PRs

branch PR
service a PR Link to PR
service b PR Link to PR

Description

For apps that are simple and require most routes to be public and have a few strictly defined private routes, this change will make every route public by default, if privateRoutes is defined. The routes defined in the array will therefore be protected instead.

Essentially the opposite of the publicRoutes array in the middleware.ts.

Must

  • Tests
  • Documentation (if applicable)

@gaokevin1 gaokevin1 requested a review from asafshen July 23, 2024 05:08
Copy link
Member

@asafshen asafshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, need to think about the combination of both Public routes and private routes

src/server/authMiddleware.ts Show resolved Hide resolved
@asafshen
Copy link
Member

@gaokevin1 we also need to add this to the sdk readme

@gaokevin1 gaokevin1 requested a review from asafshen July 23, 2024 17:56
Copy link
Member

@asafshen asafshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool 👍

some comments

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/server/authMiddleware.ts Outdated Show resolved Hide resolved
src/server/authMiddleware.ts Outdated Show resolved Hide resolved
src/server/authMiddleware.ts Outdated Show resolved Hide resolved
gaokevin1 and others added 5 commits July 24, 2024 16:56
Co-authored-by: Asaf Shen <asaf@descope.com>
Co-authored-by: Asaf Shen <asaf@descope.com>
Co-authored-by: Asaf Shen <asaf@descope.com>
Co-authored-by: Asaf Shen <asaf@descope.com>
@gaokevin1 gaokevin1 requested a review from asafshen July 26, 2024 22:25
src/server/authMiddleware.ts Outdated Show resolved Hide resolved
src/server/authMiddleware.ts Outdated Show resolved Hide resolved
src/server/authMiddleware.ts Outdated Show resolved Hide resolved
src/server/authMiddleware.ts Outdated Show resolved Hide resolved
src/server/authMiddleware.ts Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
gaokevin1 and others added 4 commits July 27, 2024 08:25
@gaokevin1 gaokevin1 requested a review from asafshen July 27, 2024 15:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants