You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Authorization Extension - although seem to be having trouble receiving data regarding the user's groups, roles and permissions.
The extension added rule automatically to enable this information to be passed back with the user information. I am trying to access this information within the auth0_user_login hook but I have yet to have any luck.
Some context of what I am trying to achieve may help. I have a large network of over 30 WordPress sites, all with the same internal users. I which to have one auth0 application for all sites and then match the roles in the extension to the default WordPress rules. Groups will be used to match the domain. e.g. if a user is assigned to group:github.com they will be able to access that site, if not they will be rejected from being able to log in.
Some direction would really help of how to get this additional information to show up in WordPress.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
@jigsawsoul - Happy to help and apologies for the delay!
The WP plugin does not currently have code that will sync up roles so using the hook you mentioned is the right way to go.
A lot of this guidance depends on how your plugin is setup but, with a default configuration, you'll want the Rule that the extension publishes to persist the data you're using (permissions, roles, and/or groups) in the metadata so WP can retrieve it on login. Your configuration screen should look like this (make sure you Publish Rule again if you make changes):
With that in place, you can now access this data from the app_metadata property in that hook:
What you do with that information is up to you but that's how you access it. Hopefully that's helpful but please reply back if you have any additional questions!
Hi,
I am using the Authorization Extension - although seem to be having trouble receiving data regarding the user's groups, roles and permissions.
The extension added rule automatically to enable this information to be passed back with the user information. I am trying to access this information within the
auth0_user_login
hook but I have yet to have any luck.Some context of what I am trying to achieve may help. I have a large network of over 30 WordPress sites, all with the same internal users. I which to have one auth0 application for all sites and then match the roles in the extension to the default WordPress rules. Groups will be used to match the domain. e.g. if a user is assigned to group:github.com they will be able to access that site, if not they will be rejected from being able to log in.
Some direction would really help of how to get this additional information to show up in WordPress.
Thanks in advance.
The text was updated successfully, but these errors were encountered: