I want to tell you that today I struggled with this issue and to solve it once and for all: I googled for

site:forum.cfx.re “Authorize application access”

Well a lot of results turned up including this forum post 2 years ago

Long story short I changed Windows 10 settings regarding default web browser to M$(Micro$oft) Edge and then I tried linking from there. It didn’t work so I changed the setting in

SETTINGS => Under “CONNECTION” Player name: MethodofLoci => DONE. Then I hit link(Still on M$ Edge!) in the FiveM app, it sent me to Edge and then back to FiveM I get a message that its linked.

FINALLY. This was so frustrating!