The trivial answer is "as quick as possible".
The user experience research group NNGroup has some relevant information regarding load times. Most relevant to your situation is probably the following.
The 3 response-time limits are the same today as when I wrote about them in 1993 (based on 40-year-old research by human factors pioneers):
0.1 seconds gives the feeling of instantaneous response — that is, the outcome feels like it was caused by the user, not the computer. This level of responsiveness is essential to support the feeling of direct manipulation (direct manipulation is one of the key GUI techniques to increase user engagement and control — for more about it, see our User Interface Principles Every Designer Must Know course).
1 second keeps the user's flow of thought seamless. Users can sense a delay, and thus know the computer is generating the outcome, but they still feel in control of the overall experience and that they're moving freely rather than waiting on the computer. This degree of responsiveness is needed for good navigation.
10 seconds keeps the user's attention. From 1–10 seconds, users definitely feel at the mercy of the computer and wish it was faster, but they can handle it. After 10 seconds, they start thinking about other things, making it harder to get their brains back on track once the computer finally does respond.
Given this, I'd say to shoot for the 0.1 seconds, but 1 second is fine as well. Longer than that, the user should be kept as informed as possible as to what the system is busy with.
If possible, status labels that meaningfully update with various stages (e.g. "Sending data to 3rd-party authorization service", "Awaiting response", "Loading profile") can be a good way to mitigate some of the pain of long load times.