Code Monkey home page Code Monkey logo

Comments (6)

jbrophy17 avatar jbrophy17 commented on September 18, 2024 1

The access tokens are saved using the keychain, which does not get cleared via an app uninstall. Can you try explicitly calling TokenManager.deleteToken() and see if the estimates are successful then?
If that is the case, then an expired token is to blame.

If you are worried about this happening in the future, I would suggest using rides client specifically for your price / time estimates that has a different (and unused) token identifier. That way, it will never get an access token and always rely on the server token

from rides-ios-sdk.

jbrophy17 avatar jbrophy17 commented on September 18, 2024 1

Though thinking about it, it probably makes more sense for the rides client to prioritize the server token for the estimates endpoints

from rides-ios-sdk.

jbrophy17 avatar jbrophy17 commented on September 18, 2024

Hm, that is strange. Are you only using server token in your app? Or do you also allow users to log in & get an access token?

If you are getting access tokens, the rides client will prefer to use an access token over a server token, so it might be attempting to get the estimates using an expired token.

from rides-ios-sdk.

gask avatar gask commented on September 18, 2024

At that point I'm using only the server token.
After I get the price estimates, I create buttons where users can click and I call the uber ride widget with that product set. I think that is the only time when the user is requested to login, but for it to happen my logic establishes that the price estimates are processed. And it's giving the "unauthorized" error...

How can I know if its attempting to get the estimates using an expired token? I already deleted my app lots of times so, probably any expired tokens that must have been there are gone because of the deletion and subsequent new installation, right?

from rides-ios-sdk.

gask avatar gask commented on September 18, 2024

@jbrophy17 I'm sorry for the delay, I was working on another project! I did what you said deleting the token through [UBSDKTokenManager deleteToken] and it started working.

About your thought: yes, it would make much more sense if the rides client prioritized the Server Token if we're talking about price estimates endpoints! Do you think its doable?

Thanks for your help, buddy!

from rides-ios-sdk.

jbrophy17 avatar jbrophy17 commented on September 18, 2024

I think it is a doable, I'll keep this open and try to incorporate it in an upcoming release

from rides-ios-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.