Giter VIP home page Giter VIP logo

Comments (5)

eriktaubeneck avatar eriktaubeneck commented on September 26, 2024

There is a similar use case for an iOS app in which the auth happens in iOS and the info would be POSTed to the application. I think that this can be abstracted to handle both cases in the same way.

As far as creating a user from a social login, see this issue.

@claymation would you like to take a stab at this?

from flask-social.

claymation avatar claymation commented on September 26, 2024

Sure. I think it involves just adding a view and maybe some customization hooks. Any ideas for the name of the view?

from flask-social.

eriktaubeneck avatar eriktaubeneck commented on September 26, 2024

I was thinking we could actually do it within the existing /login and /connect views. These are already POSTs, so we could check the form for the access_token and access_secret. If they exist, skip the OAuth step, if they don't, proceed with the OAuth.

I suppose the only danger there is that if the client sends a malformed form, we'd want to raise some sort of exception rather than continue with the regular OAuth. I'd probably have to get into the weeds to really decide, but if we build it functionally enough, we should be able to merge the views later if we decide that's practical. So, yes, for now I'd stick to a new view. Maybe validated_login and validated_connect?

from flask-social.

claymation avatar claymation commented on September 26, 2024

Given that programs (whether JavaScript, iOS, or some other native application) will be consuming these endpoints, how about something like /api/login or /login.json (and /api/connect or /connect.json)?

Since end users won't visit these endpoints directly in a browser, errors can be reported using conventional means (400 Bad Request for input errors, 500 Server Error if something goes wrong, etc), perhaps with a json response object indicating the error.

from flask-social.

eriktaubeneck avatar eriktaubeneck commented on September 26, 2024

Sounds good.

from flask-social.

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.