Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QOAuth2AuthorizationCodeFlow::granted is not working with NGROK
Forum Updated to NodeBB v4.3 + New Features

QOAuth2AuthorizationCodeFlow::granted is not working with NGROK

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 205 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • franco.amatoF Offline
    franco.amatoF Offline
    franco.amato
    wrote on last edited by
    #1

    I am implementing the "Apple Login" in my deskop app.
    Due to the fact that Apple does not allow to set the redirect url to http://localhost:port, I am using (just for testing) NGROK to redirect the traffic to my local port (5476) and I set this url as redirect url in the Apple developer console.

    In my code I have

    // Reply handler
    auto replyHandler = new QOAuthHttpServerReplyHandler(5476, this);
    m_oauth->setReplyHandler(replyHandler);
    
    connect(m_oauth, &QOAuth2AuthorizationCodeFlow::granted, this, &AppleLogin::onGranted);
    

    While I can see the received traffic in the NGROK console:

    state=0SajhHkd&code=c49365639c5644b3a80fd3659f294c2b1.0.mrsqv.BVX-As8PsnmH5Oha5Zcgww&user=%7B%22name%22%3A%7B%22firstName%22%3A%22Franco%22%2C%22lastName%22%3A%22Amato%22%7D%2C%22email%22%3A%22f.amato%40beastburst.com%22%7D
    

    The reply handler seems not catching the traffic and thus the granted signal is not emitted.
    How can I solve this problem to test my software? Is there a better way to get the traffic without using ngrok?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you consider using something like noip to have an address that you can point to your machine ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • franco.amatoF Offline
        franco.amatoF Offline
        franco.amato
        wrote on last edited by
        #3

        Hi @SGaist no I don't know how noip works

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved