When connected to campus network there is no need for OTP.
Here's a possible solution:
You can ping iitkgp.ac.in and if it doesn't drop packets, i.e. it is successful then it means the user is connected to campus network and just directly log him in bypassing the OTP requesting code.