Problem with oauth2 provider

Ok, taking the plunge and trying my first oauth integration.

Followed the first couple of post in this thread and running into classes that cannot be found.

Uploaded all files to server.

Thanks

Hello Marcel,
There is an error returned by your server action:

"message": "Class 'lib\\oauth\\Oauth2' not found",

Please check the following topic, explaining the error:

2 Likes

getting some new errors about access control checks now.

Did troubleshooting I could find:

  • checked https
  • made sure redirect url for oauth is on facebook

Do not know what else could be wrong.

Sending url in pm

Running the server action sheds more light on the problem:

Looking to see where else I have to whitelist urls

Is this facebook url ?

yes, working through that loooong thread on oauth 2 step by step, but just not getting the basics working

This isssue is not releated with wappler .
Check your white list on facebook dashboard . And do you have SSL ?

checked and checked. SSL live on site. Do not know if I missed something:

Screenshot 2020-01-29 at 15.30.32

Can the app still be in development or should it show as live?

my second picture has this filled - do you mean I must delete the info?

no no , just check

this is what I have there

Screenshot 2020-01-30 at 07.40.52

Ok, when I add the dmxConnect API file to whitelisted list, and open the api file for server action directly, it works, but running the serverconnect on a page on front end still gives the error.

How am I supposed to trigger oauth on the front end pages and redirect the user to confirm/login(which happens opening the api file directly, but not when running server connect on page?

Think I repeated myself there, but hope you understand

Well just add a server connect routing in the routing panel which links to the login server action.
Then use this route as a href for an anchor button.

1 Like

This is wrong you have to add dmxConnect api file url to white list

First image

Awesome! Thanks - got it working. After facebook authentication it returns to the api/facebook (what I called it) page. Is there a way to redirect after this? To say for instance the user’s profile page?

Yes sure you can redirect where you want … use server side redirect :+1:

At the end of the login server action as last step add a redirect step that redirects the users to any page they should go after the login.

1 Like

Thanks! Got it working except for small thing. Server Connect adds ‘#=’ to my redirect url. Is there a way to prevent this?

I’m not sure what exactly do you mean?