AWS Cloud9 LinkedIn Authentication django

python

#1

I have a project in AWS cloud9 when i tryed to do LinkedIn Authentication.(I used this guide - https://realpython.com/blog/python/linkedin-social-authentication-in-django/ and ran a server in port 8080) I added to my linkedin App the URL - ‘http://127.0.0.1:8080/complete/linkedin-oauth2/ ‘ to the field - ‘Authorized Redirect URLs:’ - in the ‘OAuth 2.0’. When I ran the commend ‘python manage .py runserver 127.0.0.1:8080’ 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.”


#2

you need to change 127.0.0.1:8080 to the preview url of your app


#4

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.”