Is it possible to use localhost for redirect URI in User settings -> Applications

I am trying to use Gitlab as an authentication provider for the website I am working on.
Is there a way to use localhost for redirect URI at my application settings? I tried setting http://localhost:1313 (and http://127.0.0.1:1313) but I receive the message:

The redirect URI included is not valid.

Thank you