@logto/remix 3.0.7 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ pnpm add @logto/remix
|
|
|
33
33
|
Before initializing the SDK, we have to create a `SessionStorage` instance which takes care of the session persistence. In our case, we want to use a cookie-based session:
|
|
34
34
|
|
|
35
35
|
```ts
|
|
36
|
-
//
|
|
36
|
+
// services/auth.server.ts
|
|
37
37
|
import { createCookieSessionStorage } from '@remix-run/node';
|
|
38
38
|
import { makeLogtoRemix } from '@logto/remix';
|
|
39
39
|
|
|
@@ -65,7 +65,7 @@ The SDK ships with a convenient function that mounts the authentication routes:
|
|
|
65
65
|
```ts
|
|
66
66
|
// routes/api.logto.$action.ts
|
|
67
67
|
|
|
68
|
-
import { logto } from '../../
|
|
68
|
+
import { logto } from '../../services/auth.server';
|
|
69
69
|
|
|
70
70
|
export const loader = logto.handleAuthRoutes({
|
|
71
71
|
'sign-in': {
|
|
@@ -101,7 +101,7 @@ import type { LogtoContext } from '@logto/remix';
|
|
|
101
101
|
import { LoaderFunction, json } from '@remix-run/node';
|
|
102
102
|
import { useLoaderData } from '@remix-run/react';
|
|
103
103
|
|
|
104
|
-
import { logto } from '../../
|
|
104
|
+
import { logto } from '../../services/auth.server';
|
|
105
105
|
|
|
106
106
|
type LoaderResponse = {
|
|
107
107
|
readonly context: LogtoContext;
|
|
@@ -22,7 +22,7 @@ class HandleSignInCallbackController {
|
|
|
22
22
|
// is present, we will replace `http` with `https` in the `callbackUri`.
|
|
23
23
|
const isForwardedHttpsTraffic = request.headers.get('x-forwarded-proto') === 'https';
|
|
24
24
|
const callbackUri = isForwardedHttpsTraffic
|
|
25
|
-
? request.url.replace('http', 'https')
|
|
25
|
+
? request.url.replace('http://', 'https://')
|
|
26
26
|
: request.url;
|
|
27
27
|
const result = await this.useCase({
|
|
28
28
|
cookieHeader,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/remix",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"directory": "packages/remix"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@logto/node": "^3.1.
|
|
22
|
+
"@logto/node": "^3.1.5"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@remix-run/node": "^2.0.0",
|