Register a twitter authenticated user with NULL email address. #3317

Closed
opened 2026-02-05 06:21:11 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @GrifisJP on GitHub (Oct 28, 2022).

Describe the feature you'd like

I just found that sometimes Twitter authentication doesn't give me a valid email, but "null".
It is ok for me and I don't want to force a new user to submit his/her email address as long as they have a valid twitter account.
I hope to set a dummy email address such as "temp@temp.com" instead, so that the user can later change to the true email whenever they wish.

The problem is it seems the current BookStack code won't let me register a twitter authenticated user with null email address.

How should I modify the code?
Thank you in advance.

Describe the benefits this would bring to existing BookStack users

Bookstack offers a more flexible new registration without email address.

Can the goal of this request already be achieved via other means?

No

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundemental request

How long have you been using BookStack?

0 to 6 months

Additional context

Probably I should modify the following codes??

app/Auth/Access/SocialAuthService.php
bf56254077/app/Http/Controllers/Auth/SocialController.php

Originally created by @GrifisJP on GitHub (Oct 28, 2022). ### Describe the feature you'd like I just found that sometimes Twitter authentication doesn't give me a valid email, but "null". It is ok for me and I don't want to force a new user to submit his/her email address as long as they have a valid twitter account. I hope to set a dummy email address such as "temp@temp.com" instead, so that the user can later change to the true email whenever they wish. The problem is it seems the current BookStack code won't let me register a twitter authenticated user with null email address. How should I modify the code? Thank you in advance. ### Describe the benefits this would bring to existing BookStack users Bookstack offers a more flexible new registration without email address. ### Can the goal of this request already be achieved via other means? No ### Have you searched for an existing open/closed issue? - [X] I have searched for existing issues and none cover my fundemental request ### How long have you been using BookStack? 0 to 6 months ### Additional context Probably I should modify the following codes?? [app/Auth/Access/SocialAuthService.php](https://github.com/BookStackApp/BookStack/blob/2d074caf72e7d1ccd9728ad944593ac09f18b7f8/app/Auth/Access/SocialAuthService.php) https://github.com/BookStackApp/BookStack/blob/bf562540770a2889d2dacc02248572911eeb5fa5/app/Http/Controllers/Auth/SocialController.php
OVERLORD added the 🔨 Feature Request label 2026-02-05 06:21:11 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 4, 2022):

Hi @GrifisJP,
From what I could find, provision of email address can depend on the configuration and approval of the twitter application.
I would not look to change our existing systems to suit this edge-case of twitter returning null emails.

Probably I should modify the following codes??

You might be better off modifying the following function instead:

024924eef3/app/Auth/Access/SocialAuthService.php (L120-L125)

Since this function is used to get user details for all main social auth routes.

I hope to set a dummy email address such as "temp@temp.com" instead

I would advise setting a unique and non-existing email for this, so <twitter_id>@example.com or something like that.

Just a reminder that all such edits to core app code are unsupported and may cause conflicts with future updates.

@ssddanbrown commented on GitHub (Nov 4, 2022): Hi @GrifisJP, From what I could find, provision of email address can depend on the configuration and approval of the twitter application. I would not look to change our existing systems to suit this edge-case of twitter returning null emails. > Probably I should modify the following codes?? You might be better off modifying the following function instead: https://github.com/BookStackApp/BookStack/blob/024924eef38179ecb12ef5cd6d7bcdcb8c15a298/app/Auth/Access/SocialAuthService.php#L120-L125 Since this function is used to get user details for all main social auth routes. > I hope to set a dummy email address such as "[temp@temp.com](mailto:temp@temp.com)" instead I would advise setting a unique and non-existing email for this, so `<twitter_id>@example.com` or something like that. Just a reminder that all such edits to core app code are unsupported and may cause conflicts with future updates.
Author
Owner

@ssddanbrown commented on GitHub (Nov 12, 2022):

Since there's been no further follow-up I'm going to close this off.

@ssddanbrown commented on GitHub (Nov 12, 2022): Since there's been no further follow-up I'm going to close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3317