NetTalk Central

Author Topic: oAuth in a server  (Read 2651 times)

Matthew51

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • Email
oAuth in a server
« on: November 06, 2017, 04:11:17 PM »
During the NT10 desktop webinar someone asked about using the oAuth feature in a server.  They were told to wait for the server webinar, but it was never mentioned.  Is it possible to make the code work in a server app, or is a server version planned?

I have played around with a desktop app, and I have some ideas about how I might get it to work, but it would require some code hacking.

Can you increase the size of parms.pScope?  I'm working with a service for a personal project that has a lot of scopes.  The first string I made was about 1700 characters, though I didn't understand what I did and didn't need, so their's a lot I can cut out, but 256 is too restrictive.

Is it possible to not save, and load information to the ini file?  Again in my personal project it is common to have one user auth several accounts at the same time.  Also I see this as a requirement for using oAuth on a server.
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: oAuth in a server
« Reply #1 on: November 06, 2017, 10:12:34 PM »
>>  Is it possible to make the code work in a server app, or is a server version planned?

It is possible to make it work (although I don't know how just yet.) A server version is planned though.

>> Can you increase the size of parms.pScope? 

done - for the next build I've increased it to 4096 bytes. (netall.inc, circa line 1210)

>> Is it possible to not save, and load information to the ini file?

absolutely. You can overide the code in your OAuthLogin procedure, in the oAuth.Save and oAuth.Load methods. Do a RETURN before the parent call, and the default save/load is not done.

You can add your own (user based) save/load here, or save in another location or whatever. See the code in OAuth.Clw for an example of what you need to load and save.

cheers
Bruce