Authenticating from 3rd party site with oauth against SuiteCRM?

I feel I must be missing something obvious here, but I can’t find this in any of the documentation. For the record, I’m relatively new to SuiteCRM

My goal is fairly simple - I have an instance of SuiteCRMwith users set up and working. I have another web application in development and rather than give it its own authentication system, I want users to be able to to authenticate against SuiteCRM.

I can find nothing about authenticating like this in the V8 api docs. I did find mention of a method in V4 at https://suitecrm.com/suitecrm/forum/developer-help/15837-oauth-token-generation, and I do get an ‘invalid token’ error when I visit index.php?module=OAuthTokens&action=authorize&token=b9a690a6a8a2 on my domain, suggesting the functionality is present. However I don’t know if this is simply there for legacy purposes, or if there is a V8 equivalent I can use and if there is a V8 implementation, how to obtain the initial user token, set callback address etc etc.

Long question made short: Does the V8 API provide a mechanism for 3rd party authentication? If so, is there any documentation on this that I have missed?

Hi

I don’t know much about the API, so I can’t answer your exact question. But if you discover the API does not provide what you need, I suggest writing a custom entry-point

https://docs.suitecrm.com/developer/entry-points/#_creating_an_entry_point

and then you can just emulate what the SuiteCRM login screen does, call the same authentication functions.

See

https://github.com/salesagility/SuiteCRM/blob/master/modules/Users/Authenticate.php

and some other files in the same directory (login.html, etc)

HI @LinkDev,
have you found a solution to your goal?
I need to make the same.
How did you implement it?
Do you have a code example?
Thank you in advice.
B.

I’m afraid I ended up giving up on this and creating a separate authentication system for my other application. I was unable to find anything to confirm that this is even possible in current SuiteCRM

1 Like

Thank you for your reply.
Did you create your custom authentication system using a custom entry point?

Thank you
B.

No, I simply gave up trying to use SuiteCRM in this way and authenticated my application entirely separately from it.