Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ekeitho/auth0-in-action
build authenticated google actions faster with auth0
https://github.com/ekeitho/auth0-in-action
Last synced: about 1 month ago
JSON representation
build authenticated google actions faster with auth0
- Host: GitHub
- URL: https://github.com/ekeitho/auth0-in-action
- Owner: ekeitho
- Created: 2018-08-13T22:45:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-25T15:44:51.000Z (over 6 years ago)
- Last Synced: 2024-11-14T02:41:57.049Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 214 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/ekeitho/auth0-in-action.svg?branch=master)](https://travis-ci.org/ekeitho/auth0-in-action)
[![Coverage Status](https://coveralls.io/repos/github/ekeitho/auth0-in-action/badge.svg?branch=master)](https://coveralls.io/github/ekeitho/auth0-in-action?branch=master)
[![npm version](https://badge.fury.io/js/auth0-in-action.svg)](https://badge.fury.io/js/auth0-in-action)# auth0-in-action
build authenticated google actions faster with [auth0](https://auth0.com)### Why did I build this?
There are a lot of great social integrations to be created on actions on google,
but working with authentication is a friction point in building out these ideas.
I want to help developers focus on building their awesome idea and avoid the potential
case of someone getting frustrated with the process and give up. I wrote this [blog](https://medium.com/@ekeitho/setup-authenticated-actions-on-google-with-auth0-51748b29c2ed) to help you get started!### How to use this library!
```typescript
import Authy from 'auth0-in-action'// your actions on google code
app.intent('actions.intent.SIGN_IN', async (conv, params, signin) => {
if (signin.status !== 'OK') {
return conv.close('You need to sign in before using the app.');
}
const authy = new Authy("yourAuth0TenantDomainName",
"auth0clientId",
"auth0clientSecret");
const {oauth_token, username} = await authy.getSocialIdentity(conv.user.access.token);
// do whatever you want with the access token -- like getting a users github repos
conv.ask(`Thanks ${username} for signing for. What can I help you with today?`);
});```