I have to complete a task below:
I have to implement salesforce integration. Which include fetching user token from salesforce using OAuth2. Once I have the token I need to fetch the list of Users, Accounts, and Contacts from salesforce and store it in the database.
I need to write the code in Django and not supposed to use any existing third-party salesforce integration app?
Please suggest me resources or algorithm to achieve the solution.
You probably need this https://www.youtube.com/watch?v=cViU2-xVscA, he has clearly mentioned the steps for creating a user account and then connected app creation and then managing our endpoint, and yes the above-mentioned docs will not harm.
Related
In other words - I want to create a simple Django Rest Framework app which preferable doesn't need it's own database.
This Django API app should only provide data for some external frontend app (e.g. Angular/Webpack stack).
There is no technical difference between external and the own database as pointed out by Kalus D. any database which is online and the username and password of it is known (means provided in django's setting.py) is Django's database. There can be multiple Databases of this type. so that's it.
But I don't think you mean the above. I think What you mean is collect data from external APIs or web pages e.g Wikipedia Rest API. then process that data like filter it, combine different data or anything you like and then send it to the user.
then yes it is possible but you don't need DRF for it. DRF is mainly applicable when you want to serialize your won models data. you can just send response in JSON format insted of html without using DRF.
Hi everyone I am new to django tastypie framework and I am trying to make a simple api which has IOS clients.I am trying to implement authorization in such a way that one user can not modify other users data i.e one user can not upload images on behalf of other user.Users should only allowed to make changes to their database records.After surfing from last two days I couldn't able to find any tutorial in implement the same.can anyone let me know the links to do the same.Thank You.
You can use django-guardian. And here is a gist with a custom Authorization class you can use in conjunction with that.
I'm using python-social-auth for user login for my organization site. I only allow Google accounts in a white list (the people in my organization) to login to the site. However, I would like to preregister everyone in the database so that I can add their custom fields (leadership positions, etc.). Is it possible to add user accounts before their first login?
Try using pipelines in python-social-auth.
Create a custom pipeline by creating pipeline.py file and add your functions here.
A simple example of functions can be found here
How could I do to allow users to link their Gmail or Facebook account in my Django App ?
I'd like to avoid my clients to register in my site if they have an account in any of the common sites (Gmail, Facebook etc...)
I know the app Django Social Auth can be used for this purposes but I'd like to know how to do this auth by my own.
Can anyone point me to some documentation or small example ?
I'd like to do this kind of authentication by my own, without external app, I'm looking for information not anybody to solve my code
Thanks
Actually, you can try to find an example how to use OAuth2 technology in Django from different django app. I use django-allauth and you can try to copy some techniques from them.
Looking to implement social authentication in our application with LinkedIn, Google, Facebook. I'm currently using flask-security to help manage users/roles in our application. I'm looking for some guidance on best practices with Flask/Flask-Security and Social Authentication.
I've seen the flask-social plugin, but I'd like to have the option of local form-based login, too.
So far, I'm planning on writing a new login view implementation for flask-security that can determine whether I'm using a social site (via passing a query parameter when user clicks on "login with XYZ") for the login. After social authentication occurs, I was planning on running the regular flask-security login to set all the appropriate session tokens and user and roles so the #login_required decorator will continue to work.
I didn't really see any hooks for overriding the login view function in flask-security, so I'm planning on either 1) copying the existing implementation into my own app or 2) calling flask_security_views::login.
However, I'm wondering if there's some of this that's already been implemented somewhere, or a better start. It seems like I'm really going to be cutting up a lot of existing code.
Thanks
Mark Hildreth is correct.
flask-social allows you to log in via a form (username/password) or via social.
So you can use it in conjunction with flask-security, flask-login, or whatever password-based authentication you want. I have used flask-social in conjunction with flask-security and can confirm they work quite well together.
flask-social links each User object to zero or more additional social accounts, which are stored in a separate table/datastore. Thus, it does not replace the existing password infrastructure...it just augments the User model and adds additional social methods to also allow for the user to log in alternatively via social accounts.