So I'm trying to integrate Google login with Parse using the "Bring your own login" system. I was able to get the basic authorization functionality to work using the code snippets at https://groups.google.com/forum/#!topic/parse-developers/UUvTreGYOrI.
Now, to do some testing, I went ahead and manually deleted the user object via the Parse dashboard. However, I am now getting the following error when trying to access go through the signup workflow:
com.parse.ParseRequest$ParseRequestException: {"code":101,"message":"object not found for get"}
I tried clearing the cache and uninstalling the app, but the issue persists. Can anyone help me how to get around this and start the registration process afresh?
On a more fundamental note, this is my first time implementing code OAuth, logins, and ACLs. As such, any resource/tutorial that can give me code examples of this integration with Parse on both the CloudCode and the client (app) side would be highly appreciated (I believe the current official Parse tutorial uses Git and only has samples of the server side CloudCode).
Nevermind - I figured it out.
I had to delete the entry in the TokenStorage class on the Parse dashboard. I guess that's storing the token that links the login with the User object.
Anyway - I'm keeping this open to see if someone can point me to a good sample code for this workflow.
Related
They say its a quickstart but idk lol
Any way I have attempted to connect to the google api with Ruby for an entire week and eventually said I am going to see if its easier with python, turns out it is not.
I have added my redirect URI in the Oauth Credential. I have tried using a web applications type, a desktop app, and a tv or limited input device.
All of them return errors.
Error 400: redirect uri mismatch
Error 400: Invalid Request
Couldnt Log you in, The browser you are using doesnt support javascript, please try signing in in a browser with javascript enabled.
It keeps trying to use a localhost uri even when its set to my authorized one in the json credentials....
Is there anyone who can help me just get a basic example connection to the API working I am starting to lose hope that it is even realistic to try and build on an API as chaotic as this has been in my research so far. Everywhere you go you see devs wasting 5 days on something that should take an hour.
Edits BELOW !!!!
This has been so confusing I had to just go to trying to make a basic api call and eliminate all of the chaos brought in by these deprecated dependencies.
I have moved to just trying to get data back using post man and this tutorial >> https://medium.com/kinandcartacreated/google-authentication-with-postman-12943b63e76a
I have successfully been able to generate an Auth token using ONLY an OAuth2.0 Credential that is of TYPE 'Web Application'
However when trying to hit this endpoint....
GET https://admin.googleapis.com/admin/directory/v1/customer/MY-CUSTOMER-ID/devices/mobile?projection=FULL
I get the following error...
I know that in the end I will need to have a service account for this application configured properly, however given the wild goose chase that this has been I have been putting it off to keep the experiment controlled.
I will be working hard on trying to demystify this service account authorization for the next 4 hours atleast...
I had some difficulty getting the "quickstart" going as well.
There are a few things that should be taken into account that, in fact, aren't clearly documented.
After setting up the credentials in the respective page in Google Console as indicated in the documentation, you should download the json file and save it to the same directory as the script.
Take note that the quickstart has its own local server that it starts up when you run it. You can set the port in this line in the script. For example:
creds = flow.run_local_server(port=3000)
Then when you configure your credentials in the project, you would set the redirect URI to http://localhost:3000/
It does require some patience, because as noted, it does sometimes take several hours until the credentials settings in the Console take effect!
https://developers.google.com/sheets/api/quickstart/python
Same as CptCook, in my case the port defined in the quickstart is set to '0', which causes the redirect_uri error.
Removing and using the default resolved the issue.
I am trying to get a Bot working with the Oauth example provided here: https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0&tabs=aadv2%2Cjavascript
If I use Azure as an exemplary issuer all works ok. So the general code works out fine.
Now, I have an example Laravel Passport app running to issue myself for testing purposes. All configuration, normal login etc. works fine. I created a generic oauth 2 client in Azure with my password client id and secret.
If I test it in the Azure Portal it heads to the request permission dialog. I confirm and it redirects to e.g. https://token.botframework.com/.auth/web/redirect?code=XYZ&state=123 and just shows Bad Request. No more, no less.
I tried different configurations etc., googled and found some with similar problems but no solution. Most just referred to secrets etc. But the secret works, a broken secret before lead to other issues I am not facing now.
And the error message is not really helpful ^^ No matter how I call https://token.botframework.com/.auth/web/redirect it is always a Bad Request.
Does anybody have an idea, a hint in what direction to look further, where issues could occur? As I am a little lost right now.
In my swift project, I am using convergence dev branch source code. I have added ADALiOS files manually in my project. Currently retrieving access token from refresh token is a problem.
Till last week my project was working all fine but as I opened my project on Mondat i.e. 20th March, 2016, I don't know how and why my app is not able to save access token in local cache. So whenever I tried to get access token silently it is unable to retrieve it from local cache. For every call I am getting following error
"The argument 'cacheItem.scopes' is invalid. Value:(null)." and
"The user credentials are need to obtain access token. Please call the non-silent acquireTokenWithResource methods."
From my side I haven't done any changes. I am able to see that new release has been done in convergence branch. Please suggest me how could I solve it also can someone suggest me whether server side changes has also been done or not because of which I am facing this issue?
For the same project settings we are using adalios in our android app and web page also. But those guys are not going through any such issue only iOS team is facing it.
If anyone has any idea please help me.
After reading full ADALiOS file structure I got to know that there are 2 imp web requests going, first is to get auth code, in this call selected "policy" is present in URL. Other call is made after my access token has expired, so to get new access token it is passing refresh token. Particularly in this call I noticed that no policy has been provided in URL. So manually I did some changes to it and added policy in the URL. After that my app is working all good and now I don't have to login again and again.
This might happen if keychain sharing is disabled. One solution might be:
Xcode > Target > Capabilities > Keychain Sharing -> Switch to ON
Add com.microsoft.adalcache into Keychain Group.
Hope this helps.
I'm writing an app that's supposed to run with MVC5 and using parse as a backend.
I'm using the new Identity feature of the MVC5 to login an user. I also tried to use this solution but I couldn't make it work.
What is happening is that when I login with the user A and then login with the user B in a different session (a incognito windows or a new browser) whenever I try to insert something related with a ParseUser object using the first user that was logged in I get an exception: UserCannotBeAlteredWithoutSessionError.
I'm not sure if I'm doing the implementation in a wrong way, or if it is a limitation of the Parse (I think it was designed to run using one user per device).
If you have a workaround for this situation please help me.
There is a good answer which may help: Parse Database Authorization - Security For User Objects.
So, it's a kind of Parse SDK limitation, when you can work with only one user per device (as ParseUser is cached locally). The only workaround that I can see is to perform SignOut/Login explicitly, when you need to do something from other user's context. There is no way to have two users work simultaneously from the same device.
We are hosting a web app on Parse's Cloud Code Hosting service but I'm having a problem getting the logged in facebook user in Express code. I can see that the client side it working when I call Parse.FacebookUtils.logIn and I can get the user in main.js using request.user when the account is logged in from an iOS app, but the same doesn't work in app.js. I've tried following the cookie handling code in this guide https://parse.com/docs/js/api/symbols/parseExpressCookieSession.html but I still get undefined when I try and access it.
I'm sure I'm missing something obvious but I'm not sure where the process is failing.
This seems to be a reasonably common problem;
https://parse.com/questions/parseexpresscookiesession-cookie-session
https://www.parse.com/questions/parseusercurrent-on-express-is-undefined-when-loggin-with-facebook
Then I finally came across this;
https://github.com/ParsePlatform/parse-facebook-user-session