AWS Cloud9 LinkedIn Authentication django



I have a project in AWS cloud9 when i tryed to do LinkedIn Authentication.(I used this guide - and ran a server in port 8080) I added to my linkedin App the URL - ‘ ‘ to the field - ‘Authorized Redirect URLs:’ - in the ‘OAuth 2.0’. When I ran the commend ‘python manage .py runserver’ the server started running and open in random url when I tried to login by LinkedIn I got the error
“Invalid redirect uri. This value must match a URL registered with the api key.”


you need to change to the preview url of your app


thanks it is working !
but now when i try to sign in via linkedin i get page with the message
“AuthCanceled at /complete/linkedin-oauth2/
Authentication process canceled”

the message "You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code."is written at the bottom of the page.
when i tried to follow the message i could not run the server and the error is “CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.”