Socket
Socket
Sign inDemoInstall

remix-auth-auth0

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remix-auth-auth0 - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

32

package.json
{
"name": "remix-auth-auth0",
"version": "1.4.0",
"version": "1.4.1",
"main": "./build/index.js",

@@ -31,20 +31,20 @@ "types": "./build/index.d.ts",

"devDependencies": {
"@babel/core": "7.18.9",
"@babel/preset-env": "7.18.9",
"@babel/core": "7.19.6",
"@babel/preset-env": "7.19.4",
"@babel/preset-react": "7.18.6",
"@babel/preset-typescript": "7.18.6",
"@remix-run/node": "1.6.5",
"@remix-run/react": "1.6.5",
"@remix-run/server-runtime": "1.6.5",
"@types/jest": "28.1.6",
"@typescript-eslint/eslint-plugin": "5.31.0",
"@typescript-eslint/parser": "5.31.0",
"babel-jest": "28.1.3",
"eslint": "8.20.0",
"@remix-run/node": "1.7.3",
"@remix-run/react": "1.7.3",
"@remix-run/server-runtime": "1.7.3",
"@types/jest": "29.2.0",
"@typescript-eslint/eslint-plugin": "5.40.1",
"@typescript-eslint/parser": "5.40.1",
"babel-jest": "29.2.1",
"eslint": "8.26.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-jest": "26.6.0",
"eslint-plugin-jest": "27.1.3",
"eslint-plugin-jest-dom": "4.0.2",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-unicorn": "43.0.2",
"jest": "28.1.3",
"eslint-plugin-unicorn": "44.0.2",
"jest": "29.2.1",
"jest-fetch-mock": "3.0.3",

@@ -54,7 +54,7 @@ "prettier": "2.7.1",

"ts-node": "10.9.1",
"typescript": "4.7.4"
"typescript": "4.8.4"
},
"dependencies": {
"remix-auth-oauth2": "^1.2.2"
"remix-auth-oauth2": "^1.3.0"
}
}

@@ -60,3 +60,3 @@ # Auth0Strategy

// app/routes/auth/auth0.tsx
import type { ActionFunction, LoaderFunction } from "remix";
import type { ActionFunction, LoaderFunction } from "@remix-run/node";

@@ -74,3 +74,3 @@ import { authenticator } from "~/utils/auth.server";

// app/routes/auth/auth0/callback.tsx
import type { ActionFunction, LoaderFunction } from "remix";
import type { ActionFunction, LoaderFunction } from "@remix-run/node";

@@ -86,1 +86,40 @@ import { authenticator } from "~/utils/auth.server";

```
```tsx
import type { ActionFunction } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { destroySession, getSession } from "~/utils/auth.server";
export const action: ActionFunction = async ({ request }) => {
const session = await getSession(request.headers.get("Cookie"));
const logoutURL = new URL(process.env.AUTH0_LOGOUT_URL);
logoutURL.searchParams.set("client_id", process.env.AUTH0_CLIENT_ID);
logoutURL.searchParams.set("returnTo", process.env.AUTH0_RETURN_TO_URL);
return redirect(logoutURL.toString(), {
headers: {
"Set-Cookie": await destroySession(session),
},
});
};
```
## Advanced Usage
### Link directly to signup
```tsx
// app/routes/register.tsx
export default function Register() {
return (
<Form action="/auth/auth0?screen_hint=signup" method="post">
<button>Register with Auth0</button>
</Form>
);
}
// https://auth0.com/docs/authenticate/login/auth0-universal-login/new-experience#signup
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc