Don't work with "social auth Facebook" module

Created on 15 December 2019, over 5 years ago
Updated 29 June 2024, 9 months ago

Problem/Motivation

To force user to accept legal documents (terms of service and privacy policy) I use the entity legal module β†’ on my D8 site.
The user has to tick two check boxes to agree both legal documents.

When the user registers via facebook auth the authorization fails and the user don't get created.

Log shows this error message:

Could not create new user. Exception: Field field_accept_tos is unknown.

Proposed resolution 1

In general I observed that facebook auth has a problem with required fields in user registration form.
In other tests with this module some required fields on the registration form are simply ignored, and despite this user gets registered.

Instead of the current behavior, the user should be redirected to user registration form with prefilled fields provided by facebook. If user adds required aditional infomation, and sends the registration form, the user gets created.

Proposed resolution 2 (IMO preferred by me nowπŸ™‚)

Another resolution by entity legal module could be that a user gets the authenticated user role, which has the same privileges like an anonymous user. After accepting the required legal entities, he gets an additional role like "authenticated user authorized" or similar. Perhaps the additional role can be chosen on module configuration page.

Then social_auth and social_auth_facebook can work as usual and the privileges get only granted, when the user accepting the legal entities.

As long as the user has not accepted the legal entities, there should be shown a warning message like "you haven't accepted the legal documents yet, so your account is currently restricted. Go to your profile settings to accept them and get full access".
Perhaps the warning message and the link text are also configurable via module configuration page.

Remaining tasks

patch needed

User interface changes

Redirect user to register form to force filling out required fields

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany dercheffe Sersheim, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024