Jump to content
View in the app

A better way to browse. Learn more.

Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Oauth2 using authorization code

Featured Replies

  • Author
14 hours ago, bfarber said:

By default OAuth connections require https. If you are testing locally and wish to disable this requirement, you can set the following in constants.php


define( 'OAUTH_REQUIRES_HTTPS', false );

We do not recommend doing this on a production environment.

 

21 hours ago, newbie LAC said:

 

 

 


I've created an OAuth Client with settings as on your screenshots

I've also changed in conf_global.php


  'base_url' => 'http://localhost/ips/',

to 


  'base_url' => 'https://localhost/ips/',

https://localhost/ips/oauth/authorize/?response_type=code&client_id=7b298e0a123154ac43d0abf0210fc87e&redirect_uri=https://localhost/ips/oauth/callback&scope=profile

 

 

 

Both answers worked. It was the https issue configuration I needed to do either in conf_global.php and init.php. What's a relief!

Thanks to (Mark, bfarber and newbie LAC) for helping me  troubleshouting this issue.

Now, I can go further to retrieve the code back from the authorize response to ask for an access token so I can get a poker demo using Oauth2 Authorization Code done!

Stay tuned!

Thanks!

 

Edited by LuckyRiver

On 4/6/2019 at 12:12 AM, bfarber said:

By default OAuth connections require https. If you are testing locally and wish to disable this requirement, you can set the following in constants.php


define( 'OAUTH_REQUIRES_HTTPS', false );

We do not recommend doing this on a production environment.

Just to go a bit stronger on this...

DO NOT UNDER ANY CIRCUMSTANCES ENABLE THAT ON A LIVE SITE - THE WORLD WILL DISSOLVE INTO CHAOS AND FIRE

Seriously though: treat access tokens like passwords or credit card numbers. Never send them over unsecured connection.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.