oauth 2.0 - How do I configure ServiceStack.net to authenticate using the OAuthProvider against Google -


i'd configure servicestack.net authenticate using oauthprovider against google. here current configuration:

            plugins.add(new authfeature(() => new authusersession(),             new iauthprovider[] {                 new oauthprovider(appsettings,                      "https://accounts.google.com/o/oauth2/auth",                      "google",                      "google client id",                      "google client secret")             })); 

however, following error:

    response status     error       code argumentnullexception     message     string reference not set instance of string. parameter name: s     stack trace [auth: 8/19/2013 7:48:47 pm]: [request: {provider:google}] system.argumentnullexception: string reference not set instance of string. parameter name: s @ system.text.encoding.getbytes(string s) @ servicestack.serviceinterface.auth.oauthutils.percentencode(string s) @ servicestack.serviceinterface.auth.oauthauthorizer.<>c__displayclass3.<makesignature>b__1(string k) @ system.linq.enumerable.whereselectenumerableiterator`2.movenext() @ system.linq.buffer`1..ctor(ienumerable`1 source) @ system.linq.enumerable.toarray[tsource](ienumerable`1 source) @ servicestack.serviceinterface.auth.oauthauthorizer.makesignature(string method, string base_uri, dictionary`2 headers) @ servicestack.serviceinterface.auth.oauthauthorizer.acquirerequesttoken() @ servicestack.serviceinterface.auth.oauthprovider.authenticate(iservicebase authservice, iauthsession session, auth request) @ servicestack.serviceinterface.auth.authservice.authenticate(auth request, string provider, iauthsession session, iauthprovider oauthconfig) @ servicestack.serviceinterface.auth.authservice.post(auth request) @ lambda_method(closure , object , object ) @ servicestack.servicehost.servicerunner`1.execute(irequestcontext requestcontext, object instance, trequest request) 

according network trace, nothing ever hits google.

thanks!

i had problem. solution double check web.config in root of service. didn't have servicestack oauth config setup correctly there.

use keys:

<add key="oauth.googleopenid.redirecturl" value="http://bootstrapapi.apphb.com/friends"/> <add key="oauth.googleopenid.callbackurl" value="http://bootstrapapi.apphb.com/api/auth/googleopenid"/> 

and google iauthprovider

new googleopenidoauthprovider(appsettings), //sign-in google openid 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -