Questions tagged [servicestack-auth]

ServiceStack's Authentication features

ServiceStack has an optional Authentication features to add Authentication to services by providing web services to Authenticate existing users, Register new users as well Assign/UnAssign Roles to existing users.

Tag questions that ask for help with issue regarding:
- pluggable and customizable plug-ins
- the caching and session providers
- RDBMS used to persist UserAuth data
- the Auth, OpenId and OAuth providers

Freely adapted from the github repository

43 questions
3
votes
2 answers

How do I use my custom ServiceStack authentication provider with Redis?

I have implemented a custom CredentialsAuthProvider for my authentication and used it with the default in memory session storage. Now I tried to change the session storage to Redis and added this to my Configure() method in the…
user3104423
2
votes
1 answer

ArgumentNullException with custom auth provider in ServiceStack

I've made a custom auth provider for LDAP (Active Directory) based on the CredentialsAuthProvider. Following the docs I've overridden TryAuthenticate and OnAuthenticated, returning true at the end. I've also tried without OnAuthenticated. I'm using…
specimen
  • 1,735
  • 14
  • 23
2
votes
0 answers

How to authorise React/TypeScript application with ServiceStack and AAD

We're having some trouble authorising our frontend React/Typescript application with our Azure Active Directory/ServiceStack backend. From what we can tell, the problem originates from the frontend and backend being on different URLs. On the…
2
votes
1 answer

How to implement Auth0 authentication in ServiceStack?

My setup consist of 3 components: Auth0, where I add users and manage their permissions. My front-end SPA web page, which serves as a shell for my API. My API, made with ServiceStack. Here's the authentication flow, as I imagine it: The user clicks…
Dan
  • 153
  • 1
  • 9
2
votes
1 answer

ServiceStack: AuthUser vs IAuthSession - how do I retrieve the AuthUser?

In previous Stack Overflow questions, @mythz tells about the Meta dictionary in the "UserAuth table". However, I cannot find any information on where the UserAuth "table" is or where the object can be found. I am currently working with the…
Ted
  • 19,727
  • 35
  • 96
  • 154
2
votes
2 answers

ServiceStack: Several logins from different devices (phone, web etc) - I want one session per device

The problem: it seems to me, like the normal and best way to look at sessions is: One session per device, per user. So, you can have one session alive per device, meaning one session per web browser, per phone, tablet etc. You should not be allowed…
Ted
  • 19,727
  • 35
  • 96
  • 154
2
votes
1 answer

ServiceStack Custom Credentials Auth with DB Stored Api Keys

Right now, we're authenticating our users with this: public class WindowsAuthProvider : CredentialsAuthProvider { public override bool TryAuthenticate(IServiceBase authService, string userName, string password) { using…
Chris Klepeis
  • 9,783
  • 16
  • 83
  • 149
2
votes
1 answer

ServiceStack AutoQuery and [Authenticate] Attribute

I'd like to enforce authentication on some auto querys. [Authenticate] public class BusinessEntitiesService : QueryDb { } Here's my issue. The above class is in my ServiceModel project... in order to add the…
Chris Klepeis
  • 9,783
  • 16
  • 83
  • 149
2
votes
1 answer

ServiceStack.ServiceInterface dll is missing

I am trying to use Authentication Plugin of ServiceStack. I added NuGet packages for ServiceStack 4.0.11 but I am unable to find DLL ServiceStack.ServiceInterface which contains the AuthService and Auth classes. I think Authentication Plugin is…
Haider
  • 1,488
  • 2
  • 15
  • 29
1
vote
1 answer

How can we generate a jwt bearertoken on ServiceStack client side to impersonate a user?

Scenario: A user logs in to Windows Authentication ASP.NET website The ASP.NET website needs to call a ServiceStack API impersonated by the Windows Authenticated user. Because Windows Authentication does not support passing thru the…
1
vote
1 answer

Why does UserAuthExtensions.PopulateFromMap(session, jwtPayload) does not deserialize json values with escape correctly in ServiceStack.Auth?

We want to get the UserName from the ServiceStack session, but we find that the backslashes in the UserName are not deserialized as expected. The UserName has this format 'domainname\username' and serialized in a jwt token this looks like: { …
1
vote
1 answer

UserAuthRole created even if UseDistinctRoleTables is false

When not using separate table for Role, e.g. UseDistinctRoleTables=false why is UserAuthRole table still created? I checked the source code, which has if-clauses for UseDistinctRoleTables many places, but not in InitSchema(). It is confusing to have…
specimen
  • 1,735
  • 14
  • 23
1
vote
1 answer

Using JwtAuthProviderReader with ServiceStack and AWS Cognito

We are using an existing userpool in AWS Cognito, a separate client app is created for our api server. When using the hosted UI from Cognito accessToken, idToken and refreshToken. The issue is when adding JwtAuthProviderReader to AuthFeature for…
Kai-Rune
  • 462
  • 6
  • 17
1
vote
1 answer

Error trying to resolve Service 'System.Boolean' from Adapter 'NetCoreContainerAdapter'

After recently converting to .NET Core I get the following error when trying to authenticate with any of our AuthProviders: "Error trying to resolve Service 'System.Boolean' from Adapter 'NetCoreContainerAdapter': Object reference not set to an…
glazjoon
  • 518
  • 2
  • 6
  • 15
1
vote
1 answer

Getting 403 forbidden with valid API key

I have a protected service, but I need to create links for sharing purpose. So I came over this feature: new ApiKeyAuthProvider(AppSettings) { AllowInHttpParams=true }, I'm calling the service, getting the API directly from the ApiKey table, and…
specimen
  • 1,735
  • 14
  • 23
1
2 3