Passing context to the login script

I am using a custom database connection with a login script. During login, I need to know the source/referral url so i can identify the system the user belongs to. Is there a way to access the referral url? or context object in this method?

here is the signature of the login method

function login(email, password, callback) {
  // TODO: implement custom login
  return callback(null, profile);
}

Hi @utsab.lohani

There is not a way to do this.

What is the use case? Why do you need the referral URL? A connection shouldn’t require this to log a user in - only the credentials. If you need this, it is an indication the architecture isn’t right. If you provide more details I will try to help.

John

1 Like