Meteor-reddit oauth error ["message::"Forbidden", "error":403] - meteor

I am getting the following error when I try to add reddit login service. The app however get registered to the user after the login process. But I dont have a new user account setup in meteor after the login process. Was wondering if anyone else has experience with this.
["message::"Forbidden", "error":403]

I had to use https://oauth.reddit.com/api/v1/me. not https://www.reddit.com/api/v1/me.
Apart from that everything else worked as it was supposed to.

Related

'Token has been expired or revoked' - Google OAuth2 Refresh token gets expired in a few days

I am using Google Analytics API to fetch analytics data. I tried to authenticate it using following steps:
Created OAuth client ID in https://console.developers.google.com/ credentials section.
In consent screen I had set publishing status as testing
In OAuth 2.0 Playground I got the refresh token using above generated client id and client secret
Then I am using it to generate access token through it.
But after a few days, the refresh token expires although it is mentioned that the refresh token's validity is life long.
If your app is in testing mode then user tokens will expire in 7 days. Please find this explanations here: https://support.google.com/cloud/answer/10311615#zippy=%2Ctesting
I needed to send mails from a gmail account that I have access to, using nodemailer. It works for a couple of days before my refresh token is mysteriously revoked, even though the account belongs to me. A google search brought me here and I had been watching for a while hoping someone would help with a solution.
As you mentioned, this seems to happen with only test/unverified apps and I'm guessing google revokes tokens for such applications in your account after a few days. After much trials and errors, here is what I did.
NOTE: This is solution is only applicable to accounts you own, otherwise you must verify your app to access other people's accounts
Generate a new refresh token (existing one is most likely revoked) as described in this SO post
Go to the security tab of your google account dashboard
Under the Recent security activity section, you should see a security alert for your app.
Click on the context menu next to the notification and click DISMISS
At this point you'll be presented with a dialog of options where you indicate the level of trust you have for the app. I just went ahead and said I trusted the developer/app, obviously. And that's it! The refresh token should persist after this.
I could not find anything related anywhere else.
The other answer pointed me in the right direction but for me the option was located somewhere else: security > security checkup/security issues found > context menu next to your app > dismiss
This issue seems to be for unverified apps, Simply delete the token file from your project and rerun the project, it will create a new token.
My problem was when I've added access_token instead of refresh_token.
What I did:
Go to https://console.cloud.google.com/apis/credentials/consent and change from the testing status to published.
Delete the current token file.
Authorize the API again by signing into your gmail account. You will be sent to a warning screen. From there, you can choose to proceed.
When done you'll get a new token file
The solution is to delete your token.json file to force Google to find a new token.
I was able to get it to work WITHOUT a verified app. Perhaps the refresh() method will work once my app is verified. Not sure on that one.

Issue with logout in cas

I am building applications using spring where I have implemented spring security.
I have multiple application, to combine them I am using cas.
In all project there is a "Log Out" option along with Gate Way project.
So my question is when I am clicking on logout only current project session is getting invalidate not from all. So how I can solve this issue.
What is issue Suppose user1 logged in and he logged out from Project 1. After that user2 logged in even I am getting user1 information in Gate Way project, once I am redirecting to Project1 I am getting correct information . Same thing if I am logging out from Gate Way project in this project only I am getting logged in user information and in other projects I am getting previous logged in user information.
How to solve this issue I have tried lot of thing but I am not getting any solution.
Thanks in advance.
You will need to implement CAS single sign out where when a request is issued to the cas log out end point and if you have single log out enables, cas can reach out to all other applications that it currently has a session with and it will attempt to log the user out from all those sessions
Finally I fixed this issue manually not CAS supplied.
onclick of logot instead of calling CAS I am calling a method of respective application. there manuall I am doing session.invalidate(), and through rest service I am calling all logout methods of other application. There also I am doing same operation i.e. session.invalidate(). Finally I am redirecting to Gate Way project's logout method same work here also. At last it redirects me to cas loggin page.

Google Developers Console - Error when inviting user to project

I have a new project in the developers console, and cannot seem to add new users. I send the invitation, this is forwarded to the correct Gmail account with the RSVP link:
'https://console.developers.google.com/project/[appname]/rsvp/'
which however results in an error message:
'The server has encountered a problem. Please try again.'
We tried inviting other gmail users and still no luck.
We also made this user an administrator of the billing account, and that works fine. Just the project is not visible to the user.
Anyone has an idea what could be the problem?
Thanks!
Ok, so the problem was in the automatic link sent by Google, which read:
https://console.developers.google.com/project/app[projectname]/rsvp/
but should have been
https://console.developers.google.com/project/app%7E[projectname]/rsvp/
It seems somewhere on the way the tilde got lost.
After changing the link by hand the RSVP works fine.
I hope this helps someone else in this situation.
I just had the same Problem, i realised that i was logged in to several google accounts, work, private etc...
I logged out and logged back in with the account i was invited to the console project and hit the link sent in the email, surprisingly it worked.
Good luck, for anyone else encountering this problem.

HybridAuth not working - User profile request failed(Google)

I'm using SocialLogin plugin for WordPress which relies on HybridAuth for authentication. However, when I try to login with Google, I get "User profile request failed. Most likely the user is not connected to the provider and he should to authenticate again." error. I've tried Googling the solution, unsuccessfully.
Also, when I try to login with StackOverflow or Yahoo! I get Unspecified error!
I came across this issue also ...
Your question is more than an year old but here you go the solution:
Go to https://console.developers.google.com/ and activate Google+ API access.
That worked out for me!
It generally occurs to me in two conditions.
Session lost when you use for example back button or directly visiting the page instead of visiting via link.
Some times you need to clear your cache, logout and login to site but clean logout
generally fix.
I also want you to know that Hybrid Auth is a dead project.

Error 406 when Drupal Services Session Authentication enabled (Drupal-iOS-SDK)

First, thank you to those of you who have put in a tremendous amount of work into building and developing Drupal-iOS-SDK. It is an amazing piece of work and I am impressed by its power daily.
Second, as a bit of background, I am writing an iOS app that allows users to login to my Drupal site with their iPhone/iPad and access their inputted data currently stored/displayed in Views.
Now, to my question/problem. So far, I have been able to successfully login to my Drupal site with the iOS app with OAuth and Session Authentication switched to off. However, as soon as I enable Session Authentication, I get a 406 error. I have tried looking online for a solution but, unfortunately, I have been unable to do so. What could be causing this problem and how would you recommend that I go about trying to resolve it?
On a similar note, my hypothesis is that disabling Session Authentication is what is causing me to get a 401 error when trying to get the app to display the views I've created. Could that be the case? Will resolving my issue above so that I can enable Session Authentication then allow me to access the views?
Thank you in advance for your help and have a great day!
Okay--I think I'm making some progress.
For the time being, I've disabled Session Authentication and don't have to deal with the 406 error. Additionally, I adjusted my Drupal views settings and now am no longer getting a 401 error when using DIOSView's viewGet. However, the responseObject for viewGet is a blank set that contains no view information. As a test, I implemented nodeGet that retrieves the node my view is linked to. I then ran the app and observed that the information returned in nodeGet's responseObject doesn't match the information for the user that successfully logged in. This makes me think that the session and/or user information is not getting passed from the app's first view (login view) to the app's second view (view that implements viewGet).
Can anybody help? I know the Drupal community, and Drupal-iOS-SDK community, is quite large and active. As such, I'm hopeful that someone can provide me with some insights and point me in the right direction.
Thanks in advance!
Check the 'sessions' table in the database. Remove any rows that have the 'uid' of the user you are logging in as and/or the 'hostname' (ip address) of the iDevice you are using to log in with. I had the same issue, getting 406 when enabling session authentication in services using drupal-ios-sdk, and this is what resolved the problem for me.
The 401 "Unauthorized" status code is because the request requires authentication. Once you get the session authentication working, check your roles and permissions. Once you are authenticated, the user should be able to access the view if they have the correct roles/permissions.
I found this problem too.
Try following this method here. It works for me
https://github.com/workhabitinc/drupal-ios-sdk/issues/30

Resources