Created
September 12, 2013 23:24
-
-
Save metadaddy/6545150 to your computer and use it in GitHub Desktop.
Simplest possible registration handler for OpenID Connect login from Google.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global class GoogleInternalRegHandler implements Auth.RegistrationHandler{ | |
global User createUser(Id portalId, Auth.UserData data){ | |
User u = [SELECT Id FROM user WHERE GoogleID__c =: data.identifier]; | |
return u; | |
} | |
global void updateUser(Id userId, Id portalId, Auth.UserData data){ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Helped a lot in my use case.
I was quite confused since I couldn't get why I had to create a new user to make it work... but your snipped just showed my the way ;)
Thanks!