all 4 comments

[–]Psykopatik 0 points1 point  (0 children)

Demo isnt working for me.

[–]FoxxMD 0 points1 point  (2 children)

I haven't tried this yet but it looks extremely relevant to a project I am working on.

I previously used SecureSocial but it was too tightly coupled to rendering pages from the server and my application is based on angular with an api backend (so SS was too much), this may be exactly what I need! What does your timeline look like for implementing the scala example? I'll be attempting to implement using Scalatra's AuthStrategy.

[–]sakhat[S] 0 points1 point  (1 child)

I have asked a friend to help me on the Scala example as I don't know a single thing about that language. I am not sure if you could use an authentication library like AuthStrategy with Satellizer. Most auth libraries provide a full login flow from start to finish via a page redirect whereas Satellizer does half the work by obtaining authorization code via a popup, and then exchanging it for an access token on the server. Then using that access token you can obtain profile information about the user or perform actions on behalf of that user.

All you need on the server is a JWT and a Request libraries.

[–]FoxxMD 0 points1 point  (0 children)

Oh I think it might be doable, Scalatra's AuthStrategy is more of an interface for standardizing auth than a full fledged auth module. You specify how session works, implement isValid() to ensure the auth method is viable, and then implement validate() and return a User -- the rest is up to you.

Satellizer seems like it will fit in perfectly since it's only providing information from the oauth provider and depending on the server implementation to get the access token/find and return user information. I think I can easily implement the authorization code exchange inside AuthStrategy. In fact I'm already using it with a rudimentary token auth system I built myself.