Twelve
Twelve

Reputation: 597

How to handle authentication with ServiceStack for SPA website?

I started developing small application with ServiceStack. I plan to create small Single-Page-Application website. I started wondering do I really need any kind of ASP.Net, because all client logic will be handled by angular in pure html pages, I don't really need i.e. Razor. I have only one concern - authentication. I'd like to use user-password, facebook and google authentications. Someone has to handle it, I'm thinking about forms authentication from MVC like in https://github.com/ServiceStack/ServiceStack.UseCases/tree/master/CustomAuthenticationMvc but this way I'd have to add MVC libraries only for the sake of authentication. Is there a better way to do this?

Upvotes: 1

Views: 310

Answers (1)

mythz
mythz

Reputation: 143284

Have a look at the section on Authentication in ServiceStack's documented Http Benchmarks example which walks through how to setup both Credentials-based Authentication and Registration (i.e. Username/Password) as well as Twitter, Facebook, Google and LinkedIn OAuth providers.

ServiceStack's docs on Authentication and Sessions are also useful in learning about Authentication in ServiceStack.

Upvotes: 1

Related Questions