The former Alloa stopper - linked with a move to Celtic - has committed himself to the Dens Park club until 2018.
Bain quit Recreation Park last summer as he was reunited with former Wasps boss Paul Hartley on Tayside.
The 23-year-old had to wait for his opportunity as Kyle Letheren started the campaign in goal for the Dee but has impressed since taking over as number one in late October.
He has notched up five clean sheets in 20 appearances as the Scottish Premiership new boys chase a top-six slot in their first season back in the top flight.
Managing Director John Nelms said: “We are very happy to have a young talent like Scott Bain commit his future to us as we continue to build for a long bright future for Dundee Football Club.”
SCOTSMAN TABLET AND MOBILE APPS