Well, I have some bad news, some good news, and some bad news.
First of all, I'm assuming you're opening the web view through the use of a card that links to the page in question. Right?
First bad news: you can't use window.close()
The Javascript window.close()
function doesn't do what it used to do. It only closes windows that it opens. Since it was opened elsehow, you can't use this method.
Some good news, sort-of
You can, however, use something like history.back()
to back out of the page. If you have only one page in the history, then this will back out of the web view and back into the Assistant.
It won't, however, let you generate another response through the Assistant. So while they might be authenticated, you can't send anything telling them that (at least not in the Assistant), until they say something back to you.
Facebook seems to sort-of allow this through their URL trick, but this is a trick, and it doesn't seem to work on all their platforms.
But the real bad news is...
Even if you can find a technical solution, you can't do this for the reason you're trying to.
Google's term's don't allow you to do any other kind of authentication except through Account Linking. Specifically it says:
Don't use any other method to associate a Google user with an account on your system