Resource icon

[TH] OAuth Integration 1.0.1

No permission to download
Thanks guys. One question for @mattrogowski. Is the bare minimum scope user:read in order for us to authenticate them and grab their userid and username?

Yeah, I believe that should work. All API endpoints and scopes are stock XenForo, this add-on doesn't change anything with that

Also is it possible to confirm what the token url is,
Code:
/api/audapi-oauth2/token
isn't working for me as suggested earlier

Can you elaborate on what you mean when you say it "ins't working"? Is there an error message or anything? That is the correct endpoint, so it should work
 
Would this allow me to integrate with a service from a company a friend and I are building? He's the coder, not me. But we do plan on our own login system between the multiple sites.
 
Could this work to allow those who are logged in to my XF cloud site to also authenticate to a bookstack wiki server I host?
It would need an integration on the Wiki itself, but it would allow the forum to be an OAuth provider, yes.
Would this allow me to integrate with a service from a company a friend and I are building? He's the coder, not me. But we do plan on our own login system between the multiple sites.
Very hard to say with such limited information, it would depend entirely on how the system was actually structured and where the source of truth for users was, i.e. where the central account is stored that you use to log in to the other services with. If the actual user is stored elsewhere then you'd need a connected account provider for XenForo rather than using XenForo as the provider.
 
Hmmm the wiki itself doesn't support general oauth i dont think.

 
First of all, I’d like to say thank you for creating this add-on, I’ve been searching for something like this for months.

At first I was rather confused due to the lack of documentation, however after a few hours of trial and error and reading through the source code I managed to figure it out.

Is there a way for users to view their authorisations and revoke them? I feel as though this could become a security/privacy issue.
 
I'm trying to add xenforo to Auth.js but its just confusing me since I havent made OAuth into something before and without docs I dont really know how it works etc.
 
The only thing you should really need is the Client ID and Client secret when setting up the application, and the OAuth endpoint URLs:

Authorization: /audapi/oauth2/authorize
Token: /api/audapi-oauth2/token
 
It doesn't return anything other than the token, you'd use it to make requests to XenForo's API with Bearer token authentication.
 
Ah, and the token is just "token" in the response?
It might be called access_token, but it's the standard OAuth response so any library you're using will handle it. It should provide you with the token, which you'd then use in calls to XenForo's API.
 
Top Bottom