Before adding the uri, try url encoding it :
callBackURI.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)
This worked for me.
Topic:
App & System Services
SubTopic:
Core OS
Tags: