I solved it by going:
Enter the Edit Settings dialog of your newly-created application and add a Redirect URI:
https://<your_home_assistant_url_or_local_ip>:<port>/auth/external/callback
instead of
https://<your_home_assistant_url_or_local_ip>:<port>/
/api/spotify`
Thanks