Try with StackOverflow suggestiong
Another try
Try to solve js erro by removing the redirect url
Replace base64 encoding with URI.escape
Add root get path and update authentication condition
Change the canvas url
Convert normal variable to instance variable
Add app_id prefix
Another approach with the canvas url
Try an approach using a callback url