Login with nextcloud

I’ve been trying to set up login with nextcloud but when I log in with my nextcloud account it just does nothing. I’ve changed the auth source from local to nextcloud. In nextcloud I used this as the URL,
https://gitea.example.com/login/oauth/authorize but that doesn’t work so I tried just https://gitea.example.com/ neither log me into my account. What do I do?

The callback configured in Nextcloud should be https://gitea.example.com/user/oauth2/<Authentication Name>/callback.

This https://gitea.example.com/login/oauth/authorize URL is for when Gitea is acting as the OAuth provider not the consumer.

ok tried that it still gave me a 500 code, can you tell me where the log files would be for gitea as nextcloud log files don’t give me much

I guess you encounter this problem:

To collect logs: