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

docs(example): add an example of using remix-auth Auth0 strategy #1674

Merged
merged 9 commits into from
Jan 30, 2022
Merged

docs(example): add an example of using remix-auth Auth0 strategy #1674

merged 9 commits into from
Jan 30, 2022

Conversation

himorishige
Copy link
Contributor

Add an example of using remix-auth Auth0 strategy

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Jan 27, 2022

Hi @himorishige,

Welcome, and thank you for contributing to Remix!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected].

Thanks!

- The Remix team

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Jan 27, 2022

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@@ -0,0 +1,23 @@
# Remix Auth - Auth0Strategy

Authentication using Remix Auth with the GitHubStrategy.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Authentication using Remix Auth with the GitHubStrategy.
Authentication using Remix Auth with the Auth0Strategy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.
I fixed it.


type LoaderData = { profile: Auth0Profile };

export const action: ActionFunction = async ({ request }) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not needed, for logout there’s another URL

Copy link
Contributor Author

@himorishige himorishige Jan 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was implemented incorrectly... I fixed it.

@@ -0,0 +1,7 @@
export const AUTH0_RETURN_TO_URL = process.env.AUTH0_RETURN_TO_URL!;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename it as .server.ts? Since it uses env variables it should never be sent to the client

Copy link
Contributor Author

@himorishige himorishige Jan 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I got it.
I rename it.

@ryanflorence
Copy link
Member

@sergiodxa if this looks good to you, let me know and I'll merge :)

@sergiodxa
Copy link
Member

@sergiodxa if this looks good to you, let me know and I'll merge :)

It looks good 👍

@ryanflorence ryanflorence merged commit 8086b3d into remix-run:main Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants