social_auth | Social Auth service for TYPO3 with Hybrid Auth API | Authentication library
kandi X-RAY | social_auth Summary
kandi X-RAY | social_auth Summary
Social Auth service for TYPO3 with Hybrid Auth API (Facebook, Twitter, Google + & LinkedIn).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of social_auth
social_auth Key Features
social_auth Examples and Code Snippets
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('social_auth')) {
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');
$signalSlotDispatcher->connect(
plugin.tx_felogin_pi1{
socialauth.wrap = |
socialauth_provider{
facebook = TEXT
facebook{
typolink{
#Custom class or title
#ATagParams =
}
wrap =
Community Discussions
Trending Discussions on social_auth
QUESTION
I'm trying to build a Python Plugin for Saleor using Poetry and I'm having issues installing the plugin on Saleor. I run poetry add ../social_auth
to install the plugin on saleor and it succeeds but when I try to run Saleor I get this Error:
ANSWER
Answered 2022-Mar-08 at 02:03The problem was that pyhton couldn't find the plugin source since it wasn't in the PYTHONPATH
and I had to add it to PYTHONPATH
environment variable using this command:
QUESTION
I want to override the pipeline to associate user's with their email for accounts that are only active. But I need the backend for a regular login. The AUTHENTICATION_BACKENDS(django.contrib.auth.backends.AllowAllUsersModelBackend) allows for all user's to be authenticated but I want only certain user's with the is_active to be authenticated using Google Login.
settings.py
...ANSWER
Answered 2022-Feb-27 at 03:06To override the original partial,
In your pipeline.py (create one, if you don't have it in your app directory), define a method:
QUESTION
So currently I can login and store my refresh token(if need be I can also store the access token) in a db using Google OAuth2 while using python social auth.
models.py:
...ANSWER
Answered 2022-Feb-15 at 01:42From your following replying,
It's most likely credentials = Credentials(get_access_token(request), scopes=SCOPES)
request.user_refresh_token is the value of the refresh token as well.
I also have a credentials.json file that contains a token_uri, client_id, and client_secret if that is correct which was used for login.
And, your question is to retrieve the access token using the refresh token. In this case, in order to retrieve the access token, how about the following sample script?
Sample script:If client_id
, client_secret
, refresh_token
and token_uri
are put in a variable, you can use the following script.
QUESTION
Just trying to save the refresh token from Google OAuth 2.0 into the abstractuser profile which signed in. It displays the refresh token and the user correctly. However when logged in the user doesn't have the refresh token stored in the model.
pipeline.py:
...ANSWER
Answered 2022-Feb-13 at 21:25The queryset method get_or_create
does not update values in the model, it only creates a new object if it doesn't exist. If you're trying to update values in an existing object, you should use the second value that get_or_create
returns to confirm it already exists and make the necessary updates.
So the adjustment would look like this:
QUESTION
I am new to this so sorry if what I am asking sounds silly. I am using only steamopenid on python-social-auth for the login, that's the only option the customer will have. Now I want to create my own custom user model where I can keep the user data once they log in. I believe it should not be too complicated but I can't find anything that seems correct.
I have managed to get username but I want to also get everything that's under user social auths table and users table. The fields that are saved into python-social-auth generated table:
settings.py
...ANSWER
Answered 2022-Feb-03 at 17:45You created a model which has a reference to the default user model of django. But I think that you want is customize your own model user. The option that i prefer is code a new model that inherits from AbstractBaseUser
, which just have a few fields and you be able to add your own needed fields (if you want to use the admin site make sure of append is_staff
, is_superuser
and to make better control override is_active
).
The last step is change in settings.py
to use this model as your user model. I
QUESTION
HttpError at /calendar https://www.googleapis.com/calendar/v3/calendars/primary/events?singleEvents=true&orderBy=startTime&alt=json returned "Request had insufficient authentication scopes.". Details: "[{'message': 'Insufficient Permission', 'domain': 'global', 'reason': 'insufficientPermissions'}]"> Request Method: GET Request URL: http://localhost:8000/calendar Django Version: 3.2.9 Exception Type: HttpError Exception Value:
Then does this after a while
RefreshError at /calendar The credentials do not contain the necessary fields need to refresh the access token. You must specify refresh_token, token_uri, client_id, and client_secret.
It seems I don't possess the right scope when accessing the calendar and it seems currently the access_token does appear.
...ANSWER
Answered 2022-Jan-24 at 09:55"Request had insufficient authentication scopes.".
If we check the documentation for events.get we will find that this method operates on private user data which means that we need to be authorized to access it. On top of that we need to be authorized with one of the following scopes
I cant see from your code which scopes you are requesting. The first thing to do is to ensure that you are requesting one of the scopes above when authorizing your user. If you change the scopes remember you must request consent of the user again for it to take effect.
You must specify refresh_token, token_uri, client_id, and client_secret.
Sounds like you are not properly storing your refresh token. get_access_token wont work if it doesn't have a refresh token stored.
In the official sample notice how they store the user creds in token.json then the library will automatically request a new access token when it needs.
QUESTION
I am using social-auth-app-django for signup-signin of new users using google oauth2 authentication.
after signup a new user is created in my db but the is_active is set as false, I want to set is_active
as true only for users created by this social_auth google authentication
(for other users who sign up using email-password I activate them by sending an account activation email) I have tried setting is_active = True for all users with no password , but I feel this way is insecure and hackish . How do I modify the social_auth_login flow to activate users as well ? I am using a custom User model :
...ANSWER
Answered 2021-Sep-16 at 09:53According to Django, the boolean is_active
designates whether this user account should be considered active. We recommend that you set this flag to False instead of deleting accounts; that way, if your applications have any foreign keys to users, the foreign keys won’t break.
In your case, I would put is_active
as True by default (if you want to delete an account, you just put it False).
Following your remark
(for other users who sign up using email-password I activate them by sending an account activation email)
you can add a boolean is_email_verified
: if the user is created by social auth, it means the is_email_verified
is True; if the user is created following email-password, is_email_verified
is False and must be set to True by sending an account activation email.
Thanks to that you can have 4 states with the 2 booleans is_active
and is_email_verified
: a user who wants to connect must have both of them as True. It seems secure to me.
QUESTION
Hi I am using the django-graphql-social-auth library and whenever I create a social user using this mutation:
...ANSWER
Answered 2021-Jun-10 at 10:51I solved it as follows:
QUESTION
In my Django=2.2 app I want to implement facebook login via python-all-auth. But I am faceing a problem with authentication on production.
Here some details:
When I use facebook login on localhost, everything is working as expected. When clicking on fb login icon, I am being redirected to fb page, I give permittion to the application to my data and I am being redirected back to the main page with User being logged in. User is created in the both tables 'Social Account Users' and my custom 'User' table.
BUT then on production, adjusting settings in facebook app accordingly, facebook authentication is being canceled. Same, after clicking on fb login icon I am being redirected to facebook page, pop up window is showing up and askig to give permittion to application by clicking "continue as a user" I am being redirected to main page with a message 'Authentication process canceled'
with debug=True, the error is:
...ANSWER
Answered 2021-Feb-16 at 17:20adding this in settings.py has solved the issue
SOCIAL_AUTH_REDIRECT_IS_HTTPS = True
QUESTION
I'm having an error('NoneType' object has no attribute 'city_set') when I try to update my users profile if I log in with facebook account. I assume the problem caused by: there is no country and city selected at first. There is no problem with normal registation and updating the profile of the user but social_django breaks the rules. I'm using abstractbaseuser model and I have a country-city models side of it. I tried many ways to figure it out but those didn't help. Many thanks for your time in advance...
settings.py
...ANSWER
Answered 2021-Jan-16 at 15:51In your AccountUpdate form you have written:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install social_auth
Register new app on Facebook, Twitter, Google, LinkedIn or Instagram and follow the instructions. Some examples are detailed on Hybrid auth user guide [http://hybridauth.sourceforge.net/userguide.html]
Configure via Extension Manager and add key + appId for each social provider & set options for fe_users creation (users pid and default usergroup id are required !)
Storage User Pid should be different from classic fe_users PID to prevent unique username
New for 8.7 instance, set file storage uid and path for fe_users.image (FAL is used now for image field)
Add excluded fields on update after each login. By default all fields (name,first_name,last_name,telephone,address,city,zip,country) are overwritten.
Add the static TS (typoscript) to your typoscript template
If we have an error like "Could not scan for classes", just uninstall extension and clear cache before upgrade it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page