6

Is there possibility to allow login to app only for certain users from Google Apps. From only one app to be more specific. I want to create admin panel that only some people can manage but I want to allow admins to login using OAuth. It will create all process simpler and more user-friendly. Have you any sources how to do it if it is possible?

2
  • Do you mean that users should login to your admin panel via the standard Google Apps login? Or that you will create your own login form that will also log users in to Google services? Feb 21, 2013 at 12:01
  • They will login only using Google Account OAuth. But I must set that only specific group from my company Google accounts will be able to login.
    – Hauleth
    Feb 21, 2013 at 12:16

1 Answer 1

8
+50

I assume you want to create your control panel app so that users can log in to it via Google's login services. If that's the case, you can limit access to your app in at least two different ways:

  1. If you follow these guidelines, that is, create your control panel app with Google Apps in mind, it will be installed along your existing Google Services. As such, you can disable/enable your app for different organizational units, via the Google Apps control panel. This method requires you to have users in different organizational units (OUs), which might be undesirable (a user can only belong to a single OU, for example).

  2. In your control panel app, make a call to the Google Apps Provisioning API to get a list of the current user's group memberships. Deny access to your control panel if the user is not a member of the required group. This method does not require you to divide users into different OUs, but have them assigned to groups instead. Instead of groups, you might want to create a role which you assign your users. ATM I cannot find an API for retrieving a user's roles, though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.