Comments (5)
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.
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.
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.
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.
Sounds good.
from flask-social.
Related Issues (20)
- Unique Oauth connections for users HOT 7
- Way to override provider? Possible? HOT 1
- AttributeError: 'Connection' object has no attribute 'user' HOT 11
- POST_OAUTH_LOGIN_SESSION_KEY is never used
- deprecated Flask-OAuth, use Flask-OAuthlib HOT 4
- Google provider HOT 4
- Demo does not work as intended HOT 5
- Minimalist Example HOT 1
- Improper Redirect HOT 1
- Facebook OAuth redirect not completing HOT 2
- SOCIAL_FLASH_MESSAGES config does not work HOT 1
- Example config for Configuration values HOT 1
- Can Flask-social be used for LinkedIn? HOT 1
- get_api method hard coded to current_user
- Python 3.x support HOT 4
- Flask factory pattern support HOT 2
- calling iteritems causes an exception on Python 3 HOT 2
- Registration HOT 2
- is this project still maintained? HOT 3
- Broken travis build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-social.