Access Token does not work without expiration date.

Summary

Access Token does not work without expiration date.

Steps to reproduce

  • Go to Profile
  • Click to Access Token
  • Give the token a name, perhaps 'test of UI'
  • In Expiration date date picker, click on the x to remove the date mention. You should then only see YYYY-MM-DD in the date picker
  • Select an any API scope (one or more)
  • Click Create Personal Access Token
  • Observe that the token is created and shown as Never Expire

What is the current bug behavior?

Getting error:

  [Composer\Downloader\TransportException]
  Invalid credentials for 'https://gitlab.com/api/

Output of checks

This bug happens on GitLab.com