5

I'm converting my Play 2 application to a SPA and I'm trying to figure out how to still use SecureSocial for authentication.

I'm removing all the HTML templates (except the ones used by SecureSocial to send emails) and modifying my controllers to only provide JSON responses.

Is it possible to prevent SecureSocial from rendering HTML and let my application exchange authentication data in JSON format? Is there any example or tutorial that explains this topic? I've been googling for a few days now and unable to find any useful or at least understandable information for a newbie like me.

j3d
  • 9,492
  • 22
  • 88
  • 172

1 Answers1

0

Latest changes in master made SecureSocial more friendly with mobile and SPA apps. You can now use the LoginApi controller to authenticate a user using the UsernamePasswordProvider or any of the OAuth2 based providers.

Jorge
  • 1,403
  • 10
  • 12
  • 2
    Tx for the info... but I already knew that. I need a JSON interface to let also non-web clientS sign up/sign in... – j3d Oct 24 '13 at 06:34
  • @j3d I updated my answer. Sign up is not supported yet but will be soon. You can now login using an API. – Jorge Jun 03 '14 at 14:02
  • Thank you for your update... even if in the meanwhile I've implemented my auth REST API based on JWT ;-) – j3d Jun 03 '14 at 19:49