Gated content and redirects with existing self-hosted auth service

Referring to the docs here: https://docs.netlify.com/routing/redirects/#syntax-for-the-netlify-configuration-file

We already maintain an application that handles all signup/login/logout/sessions as well as password resets, emailing and all the related functionality. Migrating all these users and functionality to Netlify Identity is not an option unfortunately.

Is it possible to use this general redirects file to gate static content using our own existing auth service?

If we were using netlify identity it would be as simple as
/gated-content/* 200! Role=member, is there a way to hook into that conditional logic?

Thank you!

Hey @vimproved,
Yes! Role-based access control is possible with your own auth provider as long as 1) that provider supports JWT tokens with roles metadata, and 2) you have a Business-level Netlify account.

Here are our docs on both if you want to have a look:

And the team plans:

Let us know if that helps or if you have any other questions on this!

1 Like

@jen thanks for the information! Do you have plans to add roles based access control as an addon (kind of like Forms)? 99 a month for the Business plan might be outside of the budget im not sure.

Nothing planned today, but I’ve made sure our Product team has seen your feedback on the pricing.