Signin with apple - Get the current url before going to apple form

Hi,


We have an existing web application (old) which is built for many years and we have also a new application which is only for mobile web. They have separate codes. Our problem is that, we are trying to implement a sign in with apple button and our plan is that our redirect_uri would be common for both applications. Is there a way that we can determine if the user use the sign in with apple in old web application or in mobile web?


Thanks