Yesterday I noticed problem with my application. Everything was fine, but now something is wrong with button and postbacks.
I get error:
(OAuthException) (OAuthException) An active access token must be used to query information about the current user.
while im trying use .Get("me") info # postback.
I set a watch on reguest.params(signed_request) and everyting is fine, but when I click button on my app to make postback, my request.params(signed_request) value is nothing.
Any ideas how to solve problem ?
(im using 4.2.5 (?) sdk and 5.0.6 show me the same error)
Pass access token parameter to FacebookWebClient constructor:
new FacebookClient(FacebookWebContext.Current.AccessToken);
Related
I write a code to access Firebase.
I use HTTPRequest to login, register, delete account etc.
All work well but one method - logout = SignOutUser - always returns with 404 Error, unknown URL.
Links that work with HTTPRequest:
https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=%s
https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=%s
https://www.googleapis.com/identitytoolkit/v3/relyingparty/deleteAccount?key=%s
(with proper API key added to the string, of course)
And the one that doesn't work:
https://www.googleapis.com/identitytoolkit/v3/relyingparty/signOutUser?key=%s
What can be the problem? Can it be fixed?
Is there any other way to logout a user?
I write the code in gdscript, but I tried it via web code too, same result.
Thank you in advance!
I am trying to refresh oauth token in R using rgoogle analytics library in order to export data from Google Analytics. When I create new token and try to connect, everything works just fine. I am using the following code:
require(RGoogleAnalytics)
oauth_token<-Auth(client.id = "client_id", client.secret= "client_secret")
save(oauth_token, file="oauth_token")
Problem occurs, when I try to refresh token by using:
ValidateToken(oauth_token)
I always get
Error: Refresh token not available.
I already checked, whether the file is saved in current working directory, tried to rename file, move it to different directory and change accordingly current working directory, use absolute path in command, but nothing worked for me.
Any help would be appreciated.
I was having the same problem, and after some tries, what worked was to call init_credentials() in the token object.
Doing that the login page re-launches and the ValidateToken() worked again
oauth_token$init_credentials()
ValidateToken(oauth_token)
I have a PL/SQL application which has a log out button with following code being executed when log out button is clicked:
-- Open the HTTP header
owa_util.mime_header('text/html', FALSE, NULL);
-- Send a cookie to logout
owa_cookie.send('WDB_GATEWAY_LOGOUT', 'YES', path=>'/');
-- Close the HTTP header
owa_util.http_header_close;
-- Generate the page
htp.p('You have been logged off from the WEBSITE');
htp.p('click here to log in');
htp.p('<BR>bye');
It works perfect when using internet explorer, however when I use mozzila when I log back in I am still logged in as previous user. Has anyone else been in this situation? How can I make this work for mozilla as well?
I got this code from oracle documentation page:
https://docs.oracle.com/cd/B13789_01/server.101/b12303/secure.htm
Thanks in advance!
I've found it best to set and unset your own session cookie. Then use owa_custom to verify the cookie.
In the dad.config file add:
PlsqlAuthenticationMode CustomOwa
Then create a package in your schema: called owa_custom and add one function inside: owa_custom.authorize
owa_custom.authorize will be called before each web invocation. You can check your session cookie and if you want to allow the web call return true. To block, return false and the user will get a 403 forbidden.
Then if you like you can write a custom 403 forbidden page and redirect to your login page.
Just know that in 12C, mod_plsql is going away and you'll need to use the Oracle Rest Listener. The same functionality exists there. Things just have different names.
I am using Membership Provider with standard Login control.
it was working fine till last week. but now it shows error message such as "Your login attempt was not successful. Please try again." Though I didn't show any such message. After debugging i get that Membership.ValidateUser() every time return false.
1:User is not locked even IsApproved is set properly.
2:In web.config file Application name entry of Membership section is also set properly.
I google this question but mostly saying that Application name should be there in config file, but it's not working with me.
If any one face some kind of issue or is any one know the solution please let me know.
Thanks in advanced.
I'm trying to get access token of facebook client when a user logged in with asp.net's oauth template. But I couldn't acquire the access token when i tried some methods that i found on internet like;
AuthenticationResult result = OpenAuth.VerifyAuthentication("RegisterExternalLogin.aspx");
string actok = result.ExtraData["accesstoken"];
This try wasn't successfull. How can i acquire the access token?
I see noone has replied to your question even though it has been 10 days so I'll take a stab at it.
You mentioned that you are using asp.net's OAuth template. So I think you are looking at the line
AuthenticationResult result = OpenAuth.VerifyAuthentication("RegisterExternalLogin.aspx");
in the ExternalLoginCallback() action in AccountController.cs
As far as I can tell your syntax is correct. In fact also tested it out myself and it works. I guess you can try another way of accessing the same property
String myaccesstoken_value1 = result.ExtraData.Values.ToArray()[5];
That will give you the same result as result.ExtraData["accesstoken"]
If that does not work either then I would imagine that there is some problem with the authentication itself, rather than with your syntax here. I'm assuming you have VS2012 Express, so use the debugger to see what values are present in your variable 'result'. If it is empty, then it would indicate why you second statement errors out, and it would also indicate that there is a problem in the code before you get to this point.
Also keep in mind during testing that when you log into your app using OAuth providers such as Facebook, even when you log out of the website you continue to remain logged into facebook. You actually have to go to facebook.com and click logout there also (unless you write some additional code in your asp.net app to do a remote logout). I don't know if this applies to your situation, just giving you a heads up.
Please vote if this helps.