Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

POST And openURL for REST API for web based single sign on

Discussion in 'Scripting' started by duartedd, Mar 3, 2020.

  1. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    148
    Hey all i need to convert the POST message to the URL to run the openurl so the browser can make the call instead of the unitywebrequest method - basically i am creating OPENID CONNECT unity client so that i can do single sign on via web calls - this should: launch the web browser with the appropriate rest data and i will have a wait for a response on the unity client for the response back....basically i have all the post data properly configured but the problem is unitywebrequest doesnt launch browsers and rightly so - what i need to do is have the default browser call the request and im not sure how i would do this besides converting the URL / POST Data into a url string - any suggestions?
     
  2. brownce

    brownce

    Joined:
    Sep 14, 2015
    Posts:
    18
  3. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    148
    Thanks but that is only for iOS and android
     
  4. brownce

    brownce

    Joined:
    Sep 14, 2015
    Posts:
    18
    Would be helpful to say what platform you are building for in case someone has something else for that particular platform that may help.
     
  5. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    148
    Opp was looking for all platforms ...was focused on a web based approach which why I didn't mention the platform sorry!
    I got something going though...2 options I have found which should work for any platform...1. open a web browser default installed calling the rest URL and use a built in webserver to handle the call back from the provider , prompt the user to close and go back to the app....or 2.an Embedded browser within unity which is your suggestion, is trickier but would allow better feel where the user wouldn't need to manually go back...there are the plugins ...open source even ...gonna try them out ...problem is it's gonna take 1 plugin for Windows Mac Linux and another for Android iOS but will see how that rolls...I got the consent portion working already just gotta figure out how to get the built in webserver to receive the request handleand that data. Thanks for the help brownce!