Use RegEx In Callback URL On API Manager Store

Now we can use multiple callback URLs as a regex pattern using WSO2 API Manager.


Use case

regex=(http://localhost:8080/playground2/oauth2client| http://wso2is.local:8080/playground2/oauth2client)
Image for post
Image for post
Callback URL — regex

5. Navigate to Playground application


6. Provide the following details.

Image for post
Image for post
Client Id: Your consumer key in the application
Callback URL: http://wso2is.local:8080/playground2
Authorize Endpoint: https://localhost:9443/oauth2/authorize

You will get the authorization code as below after set of steps.

Image for post
Image for post

For the callback URL you can either use http://localhost:8080/playground2/oauth2client or http://wso2is.local:8080/playground2/oauth2client. Because you registered both the URLs in step 4.

But assume you remove http://localhost:8080/playground2/oauth2client from the callback URL and perform step 5, then you will not be able to log in since it is now not a registered URL.

You will get the following error.

Image for post
Image for post

Written by

Senior Software Engineer — QA at WSO2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store