I had setup facebook as an auth provider with salesforce communities and it worked very well until a few days ago.

After spending couple of hours with it, I have found that there is a problem with the Registration handler class. When I try to edit and save the same code, I get the following error :

Error: Compile Error: Invalid type: Auth.UserData at line 2 column 41

I also tried the sample code given here (https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_auth_plugin.htm#apex_auth_plugin_part2) but get the same error.

One strange behaviour i noticed is that when i try to create a new Auth. Provider and select "Automatically create a registration handler template", I get a similar erro complaining about the type :

Error autocreating Apex Class: Invalid type: Auth.UserData

Can someone please advise why it suddenly stopped working and how can i resolve this issue?

1 Answer 1


It turns out I had another apex class with the same name "Auth". Removing it fixed the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .