Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update authenticator.md #183

Merged
merged 1 commit into from
Jul 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ authenticator.use(
This will depend a lot on what strategy you are using since each one may have different requirements. Continuing our example of the `LocalStrategy`, we need to create a `/login` route and call our authenticator there.

```tsx
import { ActionFunction, LoaderFunction, Form, redirect, json } from "remix";
import { authenticator } from ".~/auth.server"; // import our authenticator
import { getSession, commitSession } from ".~/session.server";
import { ActionFunction, LoaderFunction, redirect, json } from "@remix-run/node";
import { Form } from "@remix-run/react";
import { authenticator } from "~/auth.server"; // import our authenticator
import { getSession, commitSession } from "~/session.server";

export let action: ActionFunction = async ({ request }) => {
// Authenticate the request and redirect to /dashboard if user is
Expand Down