Authentication on another base...

48 views
Skip to first unread message

Pablo Mesquita

unread,
Jan 19, 2022, 12:20:13 PM1/19/22
to Fusio
Authentication on another base...

Hi,
I'm analyzing the possibility of migrating my software to use fusio as an API, but I already have a table that contains all user data (logins/passwords/other things...).

How can I, through a route, generate the authorization token and make the api "accept" this token as valid to access the services it will provide?

Or will I have to create a php script to generate the token and update valid tokens in fusio?

Christoph Kappestein

unread,
Jan 19, 2022, 1:20:05 PM1/19/22
to Fusio
Hi,

so I think there a two ways to handle this, in case you have an OAuth2 server which you could use, then I would recommend to build an OAuth2 provider where you redirect your users to your authorization server like for Github or Google. If this is not an option you could also try to import the data directly into the fusio_user table, you then only need to set the correct password but I would assume that the passwords from your table are encrypted in a different format so this might be a problem.

best regards
Christoph

Pablo Mesquita

unread,
Jan 19, 2022, 3:20:40 PM1/19/22
to Fusio
Well then.. the OAuth2 question I even considered but I prefer to keep the minimum of external tools..

Based on your second option would be: Remove the password field from my system and when performing the user registration do an insert/update in the 2 databases (fusio and software) and authentication I perform in fusio...

I will study the tool a little more and do some tests.

Thanks for the reply, and by the way..great work.

If I manage to integrate the tool into my software, I will make a donation to the project.

Compliments..

Christoph Kappestein

unread,
Jan 21, 2022, 2:52:20 PM1/21/22
to Fusio
Hey,

thanks for the feedback, if you want to extend the behavior of Fusio you can also take a look at our event overview s.

These are all events where you can register listeners to trigger additional logic, maybe this is also useful for your case.

best regards
Christoph

Reply all
Reply to author
Forward
0 new messages