Skip to content
New issue

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

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

Already on GitHub? # to your account

Improve documentation #160

Open
gempain opened this issue Apr 15, 2024 · 8 comments
Open

Improve documentation #160

gempain opened this issue Apr 15, 2024 · 8 comments
Labels
documentation Improvements or additions to documentation

Comments

@gempain
Copy link

gempain commented Apr 15, 2024

Maybe I missed something obvious, but I didn't find, in the documentation, an example of how to add authentication in the storefront after having enabled it in the backend. I found this example (step 6) which hint me.

I know it's up to a dev to integrate it in their storefront, but this plugin seems so much like it could be a core module of Medusa (cc @olivermrbl), that I would even add login buttons in the default storefront, enabled conditionally based on a config from the backend API.

It'd be nice to give users an example like this:

<a
        type="button"
        href={`${process.env.NEXT_PUBLIC_MEDUSA_BACKEND_URL}/store/auth/auth0/`}
        className="text-white bg-[#4285F4] hover:bg-[#4285F4]/90 focus:ring-4 focus:outline-none focus:ring-[#4285F4]/50 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-[#4285F4]/55 mr-2 mb-2"
      >
        Login with Auth0
      </a>
@danvayn
Copy link

danvayn commented Apr 22, 2024

Thanks for this, it's exactly what I was looking for. The google auth doc page has this but not the auth0 one, for whatever reason.

@adrien2p
Copy link
Owner

Hey guys, i ll do the update when i come back 💪 thanks for reporting it. Otherwise don't hesitate to open a pr i could merge it remotely, but i am from my phone for now 😅

@danvayn
Copy link

danvayn commented Apr 23, 2024

Ironically, the repo needs a bit better documentation for me to actually open a PR I believe in at this point. Compared to some of the documentation of your other repos like medusa-extender, this plugin is seriously lacking. It would be great to see one blog/guide regarding custom implementations.

For now, it won't work for me which is really disappointing, because auth is a core part of my medusa app. I suppose I'll just have to look into figuring out how to integrate clerk or something.

@adrien2p
Copy link
Owner

Well, i am sorry to ear, i do my best when i have some free time 😊 and i am happy to receive pr's as you can see others have done. Unfortunately, sometimes my plugins doesn't seems to be really used by enough people or at least it is the feeling i get when i see the stars and activity on the repo by other contributors. The extender on the other hand was used by big corporate and for that reason i have put a bit more effort to it, but i also had a lot more time for it 😅

Also, the authentication mechanism will evolve in the near future for medusa 2.0, it might happen that i migrate the strategies to separate providers with their own documentation. It will probably be a great time to make it better, just need to find time and people to contribute to it too so i feel it serves the community. Hope you understand

@danvayn
Copy link

danvayn commented Apr 23, 2024

No worries man, I totally understand. The blame probably falls on the medusa team for doing proprietary auth stuff instead of implementing existing, economic, high-DX solutions with SSO built-in like Clerk.

You are just 1 guy and if auth 2.0 is coming, I really get it.

Maybe some day you and I can collaborate on that then, as I wouldn't mind helping with documentation (if you wouldn't mind helping me understand the plugin and get my thing working 😉)

@gempain
Copy link
Author

gempain commented Apr 23, 2024

@adrien2p as I said above, I think this should become core of the Medusa project. Thanks for the plugin anyway, it works well for me.

@adrien2p
Copy link
Owner

Ahah thanks guys for your understanding ❤️i dont mind helping you at some point of course 💪, i am also a medusa core engineer and in v2 the auth module will include OAuth bu default, creating custom providers should be easier and also, it means that the auth module will be fully replaceable if necessary.

@adrien2p adrien2p added the documentation Improvements or additions to documentation label Apr 23, 2024
@gempain
Copy link
Author

gempain commented Apr 23, 2024

Ah, while we're at it, @adrien2p , I'm the guy that added Multi Language Translations in the admin UI (medusajs/medusa#4962). I tried to reach out to oli via GH, X and email, because I'd be interested in translating the Next starter, but he seems unreachable. Could you ping him 🙏 ? Thanks !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants