-
Notifications
You must be signed in to change notification settings - Fork 237
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
feat: add samlify
example
#130
Conversation
samlify
example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create an as small as possible example.
This means you should start from the remix
template & add only the really necessary things.
We don't want to make these examples too complicated/bloated.
hmm I started with the blues stack and added a few files. Should I start with a different one, or did I change it too much? Thanks! |
@christopherpickering Best is to start with the |
@MichaelDeBoey how's it looking now? You can squash when you merge? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we renamed the folder to "auth-saml-ldap" ? remix is implicit in this repo 😅
(don't forget to update the sandbox link)
Also, is the git ubmodule saml-idp really needed here?
Cool, I'll rename. Yeah, the submodule is used for the dev to show the example SAML login. |
d4290ac
to
a2e3d29
Compare
Sorry that was a messy name change, but should be good now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<!-- TODO: update this link to the path for your example: --> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should be deleted
<!-- TODO: update this link to the path for your example: --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I removed the submodule (now cloning the idp instead) and updated the lint. |
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
@MichaelDeBoey thanks bro, wish I coulda been a programmer like you 😀 unfortunately, some of us never get out of kindergarten |
shucks didn't mean to close it. |
@christopherpickering No need to make these kind of comments imo So if you feel offended by them: I'm sorry, 'cause that's not what I'm trying to do at all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also run ESLint on the files
@@ -0,0 +1,86 @@ | |||
import type { User } from "@prisma/client"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import type { User } from "@prisma/client"; | |
import type { Group, User } from "@prisma/client"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😁 I'm not offended, just jealous that I didn't see all that stuff you recommended when I went through it :) Wishing you could review all my code! |
Oh OK, then I misunderstood your comment 🙈 |
@MichaelDeBoey thanks, is there another linter you run to find more ways to improve the code, or have a better set of es rules than the default? Or have a style guide I can check out? I'm wondering how I can improve my code from the beginning. Thanks! |
@MichaelDeBoey I think I've gotten everything taken care of 👍🏽 |
@@ -0,0 +1,21 @@ | |||
import { RemixBrowser } from "@remix-run/react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this file (see #159)
@@ -0,0 +1,110 @@ | |||
import { PassThrough } from "stream"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same (see #159)
/* can't do idp initiated logout w/ cookie sessions, but can still use | ||
this point to logout if we wanna | ||
*/ | ||
export const action = async (request: Request) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const action = async (request: Request) => { | |
export const action = async ({ request }: ActionArgs) => { |
@@ -0,0 +1,8 @@ | |||
import { logout } from "~/session.server"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { logout } from "~/session.server"; | |
import type { ActionArgs } from "@remix-run/node"; | |
import { logout } from "~/session.server"; |
"saml:cert": "openssl req -x509 -new -newkey rsa:2048 -nodes -subj '/C=US/ST=California/L=San Francisco/O=JankyCo/CN=Test Identity Provider' -keyout test/saml-idp/idp-private-key.pem -out test/saml-idp/idp-public-cert.pem -days 7300", | ||
"saml:setup": "rm -rf test/saml-idp; mkdir test/saml-idp; git clone https://github.com/mcguinness/saml-idp.git test/saml-idp; cd test/saml-idp/; npm install", | ||
"start": "remix-serve build", | ||
"setup": "prisma generate && prisma migrate dev --name \"initial\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add typecheck
script to be in line with all other examples (see #98)
"setup": "prisma generate && prisma migrate dev --name \"initial\"" | |
"setup": "prisma generate && prisma migrate dev --name \"initial\"", | |
"typecheck": "tsc" |
Are you still interested in getting this one merged? If so, please rebase onto latest |
@MichaelDeBoey I ended up writing an auth strategy for remix-auth. This pr can probably be closed unless you would like it added. |
No description provided.