oauth_states Table

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
david63
Registered User
Posts: 16092
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

oauth_states Table

Post by david63 » Sat Apr 27, 2019 3:28 pm

Just been looking at something in my database and noticed a table called oauth_states which has over 47k entries in it all appearing to relater to something to do with Google.

Anyone know what this table does? Do I need it? Can I empty it?
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50423
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: oauth_states Table

Post by stevemaury » Sat Apr 27, 2019 6:02 pm

It is used for Oauth. Do you use Oauth? https://searchmicroservices.techtarget. ... tion/OAuth . The table is empty in my installation. Why not rename it and see what happens? If nothing, empty (after backing up).
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
david63
Registered User
Posts: 16092
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: oauth_states Table

Post by david63 » Sat Apr 27, 2019 8:47 pm

stevemaury wrote:
Sat Apr 27, 2019 6:02 pm
Do you use Oauth?
Never user Oauth in my life.

The strange thing is that the user ids refer to bots. Anyway I have emtied the table and everything seems to still be working. I will check if the table is filling up tomorrow.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
3Di
Former Team Member
Posts: 13684
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: oauth_states Table

Post by 3Di » Sun Apr 28, 2019 10:07 pm

Do you mean your board does not provide an OAuth login (like Google)?
In this case looks very strange, like an attack of sort (47k).
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
vader696
Translator
Posts: 74
Joined: Sat Jan 21, 2017 11:38 am
Location: Krakow, Poland
Contact:

Re: oauth_states Table

Post by vader696 » Tue May 07, 2019 8:00 am

I am optimizing my database and this table contains in my case 259K entries and almost 32MB. I use oauch (login via google and fb is available) but forum has only ~800 users which only 30/40 is active right now. Table phpbb_oauth_tokens has only 15 entries.

So is this save to truncate this table - phpbb_oauch_states? :)

User avatar
david63
Registered User
Posts: 16092
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: oauth_states Table

Post by david63 » Tue May 07, 2019 8:58 am

vader696 wrote:
Tue May 07, 2019 8:00 am
So is this save to truncate this table
I made a copy of the table in phpMyAdmin and then emptied the original table. Once I knew everything was working I then deleted the copy.

Not had any problems since.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
WelshPaul
Registered User
Posts: 298
Joined: Tue Aug 19, 2014 2:09 pm

Re: oauth_states Table

Post by WelshPaul » Tue May 07, 2019 9:33 am

I have 125,756 entries in mine and 99% are for user id 1. I do use oauth on my board but why so many entries for the anonymous user for google and facebook?

User avatar
vader696
Translator
Posts: 74
Joined: Sat Jan 21, 2017 11:38 am
Location: Krakow, Poland
Contact:

Re: oauth_states Table

Post by vader696 » Tue May 07, 2019 9:44 am

david63 wrote:
Tue May 07, 2019 8:58 am
I made a copy of the table in phpMyAdmin and then emptied the original table. Once I knew everything was working I then deleted the copy.

Not had any problems since.
Thanks David for info.
WelshPaul wrote:
Tue May 07, 2019 9:33 am
I have 125,756 entries in mine and 99% are for user id 1. I do use oauth on my board but why so many entries for the anonymous user for google and facebook?
In my case almost all 259K entries were releated to user_id = 1. I already deleted them and so far forum works fine

Code: Select all

DELETE FROM `phpbb_oauth_states` WHERE user_id = 1;

User avatar
WelshPaul
Registered User
Posts: 298
Joined: Tue Aug 19, 2014 2:09 pm

Re: oauth_states Table

Post by WelshPaul » Tue May 07, 2019 10:52 am

I am aware of how to remove them but why are so many there lol
Last edited by WelshPaul on Tue May 07, 2019 11:02 am, edited 1 time in total.

User avatar
david63
Registered User
Posts: 16092
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: oauth_states Table

Post by david63 » Tue May 07, 2019 10:57 am

WelshPaul wrote:
Tue May 07, 2019 10:52 am
I am aware of how to remove them but why are they there lol
That was the question that I asked in the OP - and it appears that nobody knows :shock:
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
WelshPaul
Registered User
Posts: 298
Joined: Tue Aug 19, 2014 2:09 pm

Re: oauth_states Table

Post by WelshPaul » Tue May 07, 2019 11:07 am

Well the entries are being created every-time a guest or bot navigates to one of the oauth login links.

Such as:

Code: Select all

https://www.domain.com/ucp.php?mode=login&login=external&oauth_service=facebook

User avatar
david63
Registered User
Posts: 16092
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: oauth_states Table

Post by david63 » Tue May 07, 2019 11:44 am

But I do not use oauth!!!
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
vader696
Translator
Posts: 74
Joined: Sat Jan 21, 2017 11:38 am
Location: Krakow, Poland
Contact:

Re: oauth_states Table

Post by vader696 » Tue May 07, 2019 1:03 pm

david63 wrote:
Tue May 07, 2019 11:44 am
But I do not use oauth!!!
Yeah, I know and that is interesting. Maybe even oauth is disabled and someone somehow used url

Code: Select all

https://www.domain.com/ucp.php?mode=login&login=external&oauth_service=facebook
, then database record is created?
WelshPaul wrote:
Tue May 07, 2019 10:52 am
I am aware of how to remove them but why are so many there lol
As I wrote before I already removed those entries and forum still works fine. Don't worry, create backup and delete them :)

User avatar
WelshPaul
Registered User
Posts: 298
Joined: Tue Aug 19, 2014 2:09 pm

Re: oauth_states Table

Post by WelshPaul » Tue May 07, 2019 1:10 pm

david63 wrote:
Tue May 07, 2019 11:44 am
But I do not use oauth!!!
I don't recall saying you did. I was just pointing out what the cause of the entry in the database was.
vader696 wrote:
Tue May 07, 2019 1:03 pm
As I wrote before I already removed those entries and forum still works fine. Don't worry, create backup and delete them :)
I had already deleted before making my very first post. Deleting them though will not stop the hundreds of thousands of new entries that will rack up over time. Should there not be some form of cron that purges old entries?

User avatar
Scanialady
Registered User
Posts: 265
Joined: Thu Jan 17, 2013 7:09 pm
Location: Germany
Name: Annette
Contact:

Re: oauth_states Table

Post by Scanialady » Tue May 07, 2019 7:36 pm

hm - there is an option "oAuth" under ACP - Authentication. But I use Db. My oAuth-tables are empty.
Webseite, Blog, Wiki Deutsche Übersetzungen - german language files
My 2 cents: Whether an extension is in the CDB says nothing about its quality. It is more important to read the support topics for it. Better to avoid authors who do not answer support questions themselves, who do not update their stuff, and who do not fix bugs for years.

Post Reply

Return to “[3.2.x] Support Forum”