Oauth2 Auth code flow always returns canceled

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
AdamGrant
Posts: 4
Joined: Fri Jul 28, 2023 10:06 pm

Oauth2 Auth code flow always returns canceled

Post by AdamGrant » Fri Jul 28, 2023 10:16 pm

Hey everyone.

I have been bashing my head against this for a few days and have finally given up and turned to the forums for help.
I am trying to auth a flutter application with simpro using the flutter oauth2_client package https://pub.dev/packages/oauth2_client. All appears to be working, I get taken to the login, I login with simpro credentials and press yes, I am then redirected back to my application but I receive a 404 error which traces back to an error message that says:
errorCode: CANCELED
errorMessage: User canceled login

I get redirected back to my app so it seems all of the flow is working but no matter what I do the response is always user canceled.
Has anyone seen this before or can point me in the right direction? at this point my next step is to write the oauth2 flow myself so I can debug it further but before I do that I thought I would try my luck on here.

Thanks in advance! :D

Adam
AdamGrant
Posts: 4
Joined: Fri Jul 28, 2023 10:06 pm

Re: Oauth2 Auth code flow always returns canceled

Post by AdamGrant » Mon Jul 31, 2023 6:50 am

Blocked on this if anyone can give me a hand? :)
AdamGrant
Posts: 4
Joined: Fri Jul 28, 2023 10:06 pm

Re: Oauth2 Auth code flow always returns canceled

Post by AdamGrant » Mon Jul 31, 2023 11:17 am

If anyone is interested, solved this by writing my own oauth2 flow using webviews. If using flutter I don't recommend use oauth2_client. :D
Post Reply