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

Fix examples not returning a Promise in actions #60

Merged
merged 1 commit into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ import { getSession, commitSession } from "~/session.server";
export let action: ActionFunction = async ({ request }) => {
// Authenticate the request, after that it will redirect to the defined URLs
// and set the user in the session if it's a success
authenticator.authenticate("local", request, {
await authenticator.authenticate("local", request, {
successRedirect: "/dashboard",
failureRedirect: "/login",
});
Expand Down
4 changes: 2 additions & 2 deletions docs/strategies/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { authenticator } from "~/auth.server";
export let loader: LoaderFunction = () => redirect("/login");

export let action: ActionFunction = ({ request }) => {
authenticator.authenticate("github", request);
return authenticator.authenticate("github", request);
};
```

Expand All @@ -62,7 +62,7 @@ import { ActionFunction, LoaderFunction } from "remix";
import { authenticator } from "~/auth.server";

export let loader: LoaderFunction = ({ request }) => {
authenticator.authenticate("github", request, {
return authenticator.authenticate("github", request, {
successRedirect: "/dashboard",
failureRedirect: "/login",
});
Expand Down
4 changes: 2 additions & 2 deletions docs/strategies/google.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { authenticator } from "~/auth.server";
export let loader: LoaderFunction = () => redirect("/login");

export let action: ActionFunction = ({ request }) => {
authenticator.authenticate("google", request);
return authenticator.authenticate("google", request);
};
```

Expand All @@ -62,7 +62,7 @@ import { ActionFunction, LoaderFunction } from "remix";
import { authenticator } from "~/auth.server";

export let loader: LoaderFunction = ({ request }) => {
authenticator.authenticate("google", request, {
return authenticator.authenticate("google", request, {
successRedirect: "/dashboard",
failureRedirect: "/login",
});
Expand Down