I know that there is a The first answer was very helpful for me. It requires that you use the Google + sign in button, But this is a good temporary sollution. The reason for this is that I want to do some more work, because I want to use it for admin console pages, in this situation, the administrator has already entered Google, so it looks strange when there is a Google+ login button . Another way to implement it will be to create my own Ohoth system, where a script in the admin page requests a general request, which requests that the user is the administrator, and if This is so, in a way, the administrator token, which gives the user access to my endpoint methods. With each endpoint request, I'm already using a similar token system, which is part of the application, because I can not use Google Accounts for the app. The token is valid only for a limited time, and for limited requests. get_current_user function in the endpoint module, but as far as I know , The user object does not have any property or address that the user is an admin or not.
No comments:
Post a Comment