Omnis-OAuth2
Mike Matthews - Omnis
omnis at lineal.co.uk
Fri Aug 21 08:53:12 EDT 2020
Hello Mayada
Keith is right, they don’t let any old person in. Do yo not already have some credentials? Let me know if you need any help here, as we have our.
Thanks
Mike
[Lineal Software Solutions] <http://www.lineal.co.uk>
[Twitter]<https://twitter.com/linealsoftware> [Facebook] <https://www.facebook.com/linealsoftware?fref=ts&ref=br_tf> [Google +] <https://plus.google.com/112982815000763473226/about> [LinkedIn] <https://www.linkedin.com/company/1859834?trk=tyah&trkInfo=clickedVertical%3Acompany%2Cidx%3A1-1-1%2CtarId%3A1437729256906%2Ctas%3Alineal%20s>
[https://s3.amazonaws.com/htmlsig-assets/spacer.gif]
Mike Matthews
omnis at lineal.co.uk<mailto:omnis at lineal.co.uk>
Lineal Software Solutions
01271 375999
Commercial House, The StrandBarnstaple, Devon, EX31 1EU
www.lineal.co.uk<http://www.lineal.co.uk>
[http://www.lineal.co.uk/stuff/EmailSig/MicrosoftPartner.png]<http://www.lineal.co.uk/windows-support/> [http://www.lineal.co.uk/stuff/EmailSig/Office_365.png] <http://www.lineal.co.uk/microsoft-office-365/> [http://www.lineal.co.uk/stuff/EmailSig/Cisco.png] <http://www.lineal.co.uk/wifi-networks/> [http://www.lineal.co.uk/stuff/EmailSig/Meraki.png] <http://www.lineal.co.uk/wifi-networks/> [http://www.lineal.co.uk/stuff/EmailSig/Dell.png] <http://www.lineal.co.uk/it-systems/> [http://www.lineal.co.uk/stuff/EmailSig/Gamma.png] <http://www.lineal.co.uk/gamma-horizon-voip/> [http://www.lineal.co.uk/stuff/EmailSig/Kerio.png] <http://www.lineal.co.uk/kerio/> [http://www.lineal.co.uk/stuff/EmailSig/Apple.png] <http://www.lineal.co.uk/apple-upgrades-repairs/> [http://www.lineal.co.uk/stuff/EmailSig/Eset.png] <http://www.lineal.co.uk/eset-security-software/> [http://www.lineal.co.uk/stuff/EmailSig/mitel.png] <http://www.lineal.co.uk/shoretel/>
On 21 Aug 2020, at 13:22, malkishtini <malkishtini at gmail.com<mailto:malkishtini at gmail.com>> wrote:
Hi Kelly,
Thank you for your response and yes you are right about the IP; I didn't
realize first that the connection to the auth server is going thru oBrowser
(things make sense now).
Re- the error I'm getting 'invalid redirect URL', I started to think that my
problem is because I'm trying to access the auth server from Canada (outside
UK).
As I have created a new account, new client id, secret key and I have
registered the redirect URL there and still getting the same error.
This is what is written about the "redirect URIs" on their documentation:
"Your application needs your user's permission to interact with HMRC on
their behalf when accessing user-restricted endpoints. Users must sign in to
their Government Gateway account to grant this authority.
Afterwards, redirect URIs tell us where to return your users in your
application."
I'm not sure what do they mean by " Users must sign in to their Government
Gateway account to grant this authority"..
So no luck yet in getting the Auth token from the HMRC server.
Thank you,
Mayada
-----Original Message-----
From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf
Of Kelly Burgess
Sent: Friday, August 21, 2020 12:48 AM
To: OmnisList
Subject: Re: Omnis-OAuth2
Hi Mayada,
I'm glad to know that localhost did work with you, which will make testing
easier for me, although I don't understand how the auth server will know
how
to reach it.
The auth server knows your IP because you request the auth code from it, so
that's the IP it responds to.
Else ;; normal path for this DropBoxAccess demo...
; Open the authorization URI in an oBrowser object by default.
Open window instance wAuth2Browser/CEN (uri)
; uri = e.g. https://www.dropbox.com/1/oauth2/authorize?
; ;; Accept=application/json
; ;; &response_type=code
; ;; &client_id=xyz4gddhgv8v7iy
; ;; &state=7c633e9422a54a95d72052040f5ea642
; ;;
&redirect_uri=http://localhost:9816/api/DropBoxAccess/oauth2/code
End If
;
; Control returns via the redirectURL to the $onCodeReceived method, which
will use the code to request a token. ;; (and remove the cAuthQueue
entry)
So you open the browser window and request the authorization code, the auth
server interacts with the user in that browser window and gets their
approval, then it calls back through the redirect URL (i.e. your remote
task's /code.$get URI method) to give you the code you need to request the
access token. I'm just guessing that it would interpret 'localhost' as
'sender's IP'. When it works you stop wondering...
Kelly
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list