How to limit scopes?

19 views
Skip to first unread message

Me Self

unread,
Aug 24, 2014, 1:04:17 PM8/24/14
to socialau...@googlegroups.com
Hi All - Im evaluating socialauth to access only the users profile name and profile photo. Testing this snippet from the WIKI :

manager.getAuthenticationUrl("facebook", successUrl);

seems to produce a URL that asks for all scopes including "email" "user_birthday" "user_location" etc. :


How do I limit the scopes to only ask for permission to access profile name and photo?

Lorenzo Boccaccia

unread,
Sep 24, 2015, 5:39:13 PM9/24/15
to socialauth-users
ok this is super late but had this problem, figured it out and wanted to leave it here in somewhere searchable

you have to set the scope using the custom_permission property, each provider has it's own scope so here's what I've done

Properties p = new Properties();
setupProvider("api.github.com", p, "key", "secret", "user:email");
setupProvider("graph.facebook.com", p, "key", "secret", "email");
...
String url = manager.getAuthenticationUrl(request.getParameter("provider"), successUrl, Permission.CUSTOM);




Reply all
Reply to author
Forward
0 new messages