Skip to content

Commit 9d55c12

Browse files
Update auth dependencies (#181)
* Fix to prisma readme * Update encore.dev dependency * Fixes to clerk example
1 parent e863ffe commit 9d55c12

File tree

7 files changed

+9
-13
lines changed

7 files changed

+9
-13
lines changed

ts/auth0-react-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"dependencies": {
1717
"auth0": "^4.13.0",
18-
"encore.dev": "^1.43.11",
18+
"encore.dev": "^1.44.5",
1919
"jsonwebtoken": "^9.0.2",
2020
"@types/react": "^18.3.12",
2121
"@types/react-dom": "^18.3.1",

ts/clerk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ The frontend can be deployed to Vercel. Follow these steps:
119119
3. Select `frontend` as the root directory for the Vercel project.
120120

121121
Once you have your frontend deployed:
122-
* Update the *Allowed Callback URLs*, *Allowed Logout URLs* & *Allowed Web Origins* settings in your application on Auth0 with the deployed Vercel URL.
122+
* Update the `AUTHORIZED_PARTIES` array in `auth/config.ts` to include the deployed Vercel URL.
123123
* Set the `allow_origins_with_credentials` in the `encore.app` (see below) file to the deployed Vercel URL.
124124

125125

ts/clerk/frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"vite": "^4.4.5"
1818
},
1919
"dependencies": {
20-
"@clerk/clerk-react": "^4.30.5",
20+
"@clerk/clerk-react": "^5.17.1",
2121
"react": "^18.2.0",
2222
"react-dom": "^18.2.0",
2323
"react-router-dom": "^6.16.0"

ts/clerk/frontend/src/App.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ export default function App() {
8383
}
8484

8585
function Layout({ children }: PropsWithChildren) {
86-
const navigate = useNavigate();
87-
8886
return (
89-
<ClerkProvider navigate={navigate} publishableKey={PUBLISHABLE_KEY}>
87+
<ClerkProvider publishableKey={PUBLISHABLE_KEY}>
9088
<div>
9189
<header>
9290
<nav className="nav">

ts/clerk/frontend/src/lib/getRequestClient.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import Client, { Local } from "./client.ts";
1+
import Client, { Environment, Local } from "./client.ts";
22

33
/**
44
* Returns the generated Encore request client for either the local or staging environment.
55
* If we are running the frontend locally we assume that our Encore backend is also running locally.
66
*/
77
const getRequestClient = (token: string | undefined) => {
8-
const isLocal =
9-
location.hostname === "localhost" || location.hostname === "127.0.0.1";
10-
const env = isLocal ? Local : window.location.origin;
8+
const env = import.meta.env.DEV ? Local : Environment("staging");
119

1210
return new Client(env, {
1311
auth: { authorization: token || "" },

ts/clerk/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
},
1616
"dependencies": {
1717
"@clerk/backend": "^0.38.3",
18-
"encore.dev": "^1.41.1",
19-
"@clerk/clerk-react": "^4.30.5",
18+
"encore.dev": "^1.44.5",
19+
"@clerk/clerk-react": "^5.17.1",
2020
"react": "^18.2.0",
2121
"react-dom": "^18.2.0",
2222
"react-router-dom": "^6.16.0"

ts/prisma/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is a RESTful API Starter with [Prisma](https://prisma.io) as ORM to handle
77
When you have [installed Encore](https://encore.dev/docs/ts/install), you can create a new Encore application and clone this example with this command.
88

99
```bash
10-
encore app create my-app-name --example=ts/prisma
10+
encore app create --example=ts/prisma
1111
```
1212

1313
## Running locally

0 commit comments

Comments
 (0)