social auth templates and pipeline functions