Providing auth for static HTML/JS application with Sails.js

I have a client side application written in plain HTML/JS (Not with Angular.js or other front-end MVC framework). It contains multiple html file. each includes different js library.

I would like to provide basic user auth feature(using sails-generate-auth) to limit the access of this client-side application using Sails.js

But I'm having problem putting those html file into /views

Should I change all *.html in to *.ejs and edit /config/routes.js to route each file? How do I make use of the req.session.authenticated ? Please provide some direction. Thank you.

Your solution written in your question would work. Here is another option:

You can send the file straight from your controller or for universal usage you can create a custom response that will send the html file instead of attempting to render the ejs view. Call it sendHtml(), or modify the current ok.js to know and send your html files

http://sailsjs.org/#!/documentation/concepts/Custom-Responses

Use something like res.sendfile('/views/' + rest.controller + '/' + res.action + '.html');