I seem to be missing something. I had a legacy oauth2 provider that I removed and am converting to the newer one that doesn’t have the net framework dependency. I just inheritted from ServiceStack.Auth.OAuth2Provider:
public MyOAuthProvider(IAppSettings appSettings, string realm, string providerId) : base(appSettings, realm, providerId)
{
this.appSettings = appSettings;
}
}
The actual registration is the same as before (when it was working):
Plugins.Add(new AuthFeature(() => new MySession(),
new IAuthProvider[] {
// new DtAuth(),
jwtProvider
,
new MyOAuthProvider(AppSettings, wpo.Realm, "myprovider") {
AuthorizeUrl = wpo.Endpoint(wpo.AuthorizeUrl),
CallbackUrl = $"{AppSettings.Get("baseDomain","")}auth/myprovider",
ConsumerKey = wpo.Key,
ConsumerSecret = wpo.Secret,
AccessTokenUrl = wpo.Endpoint(wpo.AccessTokenUrl),
UserProfileUrl = wpo.Endpoint(wpo.UserProfileUrl),
SuccessRedirectUrlFilter = (auth, url) => {
var urls = new GetUserData().ToGetUrl();
urls.AddQueryParam("RedirectSuccess",1);
return urls+ ".json"; },
},
Authentication.GetAuthProviders()
returns an empty list after this and the /auth/myprovider throws an error that seems to indicate it is related when before it would redirect to the configured I’m just looking for a pointer in the right direction as this worked completely fine until I ripped out the ServiceStack.Authentcation.OAuth2Provider library.