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

Strapi v5 compatibility #59

Merged
merged 2 commits into from
Sep 26, 2024
Merged

Strapi v5 compatibility #59

merged 2 commits into from
Sep 26, 2024

Conversation

marc0777
Copy link

Support for Strapi v5, currently tested on RC11, fixes #58.

I set it as draft as there are a few things that I have to look into. I tested it with Autentik and it was working correctly, now looking into testing it with AzureAD (probably will need to also fix #24 for that to work).

Will update it as soon as I as I have news, with also a bit of explanation on how to use this, since since Strapi v5 plugins should be built.

@delemeator
Copy link

#24 should not be an issue as long as users have email defined in AzureAD. The problem is that email is just not mandatory in Azure AD

@marc0777 marc0777 changed the base branch from main to strapi_v5 August 29, 2024 15:29
@marc0777
Copy link
Author

marc0777 commented Sep 5, 2024

@delemeator yes you're right, I was having a similar problem but it was unrelated (using an HTTPS proxy is broken in axios/https and that was causing the request to fail and therefore the SSO fail in the same way as described in that issue).

I was able to test it with AzureAD and have been using the updated extension without problems on Strapi v5 RC11 for a few days now.

@yasudacloud do you prefer to wait for Strapi to release the first stable version before merging or to merge this into the branch and keep that updated?

@yasudacloud
Copy link
Owner

@marc0777
I plan to publish on npm after the official release of v5, but there’s no issue with merging into the strapi_v5 branch at any time.

@yasudacloud
Copy link
Owner

@marc0777
Hello!
Thanks for all the commits.

I would like to make some changes to the v5 branch on my end, so I would like to merge it once, is that OK?

@marc0777
Copy link
Author

I haven't written here anymore because since RC18 the plugin stopped working, and it doesn't run with the stable version either.
I wasn't able to figure out what changed and I'm having problems also running the examples given by the Strapi team. I've since opened an issue regarding this, strapi/sdk-plugin#60.

If you want to merge and start working on it yourself feel free to do so! :)

Just a couple of notes:

  • some parts weren't included in the PR so far, so take a deep look at the diff
  • according to the new SDK plugins should now be built, all commands to be used are already in the package.json

I'll be available in case you need more information.

@yasudacloud
Copy link
Owner

@marc0777
Thank you for sharing the details.
I would like to proceed based on your commitments.

By the way, regarding strapi/sdk-plugin#60 , I encountered a similar error while writing another plugin in TypeScript.
At that time, using dynamic imports solved the issue.

@marc0777
Copy link
Author

Yes, using dynamic imports worked here too but it looks like an hack and I hope it's not the approach "officially" recommended by Strapi.

@marc0777
Copy link
Author

Hello, I've refactored the plugin to use ES Module syntax, now all imports are working correctly and the syntax is much cleaner too.

I've tested this in Strapi 5.0.1 and everything seems to be working!

@marc0777 marc0777 marked this pull request as ready for review September 26, 2024 10:29
@yasudacloud yasudacloud merged commit a450e73 into yasudacloud:strapi_v5 Sep 26, 2024
@yasudacloud
Copy link
Owner

@marc0777
Thanks so much for the PR!!
I checked it works on my end as well and the build went through and I was able to log in with each provider.

However, there were a few things I wanted to fix, so I will try to fix them on my end as well.

@marc0777 marc0777 deleted the v5 branch October 9, 2024 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strapi 5 Support with AzureAD, getting data undefined
3 participants