Giter Site home page Giter Site logo

Comments (7)

lasconic avatar lasconic commented on August 31, 2024 1

I'll release a new version (0.2.0) including this fix and the crowdfunding api soon

from finary_uapi.

lasconic avatar lasconic commented on August 31, 2024

The web UI now does a POST https://clerk.finary.com/v1/client/sign_ins?_clerk_js_version=4.67.0 with identifier and password in the payload.

Finary apparently uses https://clerk.com. There is a python SDK here : https://pypi.org/project/clerk-sdk-python/, not sure if it's needed or if it's maintained.

A wrong password -> HTTP error 422 and a json payload with error
Right password -> HTTP 200, somehow we should get a token that we can use in the next API call.

Apparently the token is refreshed often. Not sure if we deal with it in this tool or we let it to the user. Maybe we can verify the token before each call ?

from finary_uapi.

lasconic avatar lasconic commented on August 31, 2024

The API doc : https://clerk.com/docs/reference/frontend-api/tag/Sign-Ins#operation/createSignIn

from finary_uapi.

lasconic avatar lasconic commented on August 31, 2024

Knowing all this, it's pretty simple to modify signin to POST https://clerk.finary.com/v1/client/sign_ins, get a token in the response and use it in the next call on /me for example. It works.

BUT, it's less easy to refresh the token without doing a signin again with the token expired. I'm working on it. Ideally, I would like the signin to be persist more than 20 seconds.

@MadeInPierre what do you think ? What are the requirements for finalynx ?

from finary_uapi.

lasconic avatar lasconic commented on August 31, 2024

refreshing the token now works. Next step 2FA...

from finary_uapi.

MadeInPierre avatar MadeInPierre commented on August 31, 2024

Somehow the old login still works today without issues using finalynx. Deprecated but still active for some time maybe?

I'll look into updating finary_uapi and try your new solution. Thanks for the work!

from finary_uapi.

lasconic avatar lasconic commented on August 31, 2024

Version 0.2.0 is out on Pypi and supports the new signin scheme only. Main difference, there is a call to clerk.com before any call to api.finary.com

from finary_uapi.

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.