Skip to content

Instantly share code, notes, and snippets.

@dllewellyn
Created March 29, 2020 06:41
Show Gist options
  • Save dllewellyn/f303eaf0d0ad6c2f38633db1109d4dbf to your computer and use it in GitHub Desktop.
Save dllewellyn/f303eaf0d0ad6c2f38633db1109d4dbf to your computer and use it in GitHub Desktop.
​@Controller​(​"​/loin"​)
​class​ ​CustomTokenController​ {
    ​@Secured​(​SecurityRule​.​IS_ANONYMOUS​)
    ​@Get​(​"​/logmein​"​)
    ​fun​ ​getLogin​(​principal​:​ ​Principal​) ​:​ ​String​ {
        ​FirebaseUtil​.initialise()
        ​return​ ​FirebaseAuth​.getInstance().createCustomToken(principal.name)
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment