UNPKG

@sanmigueldev/suma-module

Version:

Módulo simple para sumar números

78 lines (61 loc) 2.26 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Tutorial: Authentication</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Tutorial: Authentication</h1> <section> <header> <h2>Authentication</h2> </header> <article> <h1 id="authentication">Authentication</h1> <p>Learn how to authenticate with our API.</p> <h2 id="api-key-authentication">API Key Authentication</h2> <p>The simplest way to authenticate is using your API key:</p> <pre class="prettyprint source lang-javascript"><code>const api = require(&quot;our-api&quot;); api.init({ apiKey: &quot;YOUR_API_KEY&quot;, }); </code></pre> <h2 id="oauth-authentication">OAuth Authentication</h2> <p>For more advanced scenarios, you can use OAuth:</p> <pre class="prettyprint source lang-javascript"><code>const api = require(&quot;our-api&quot;); api.authenticate({ clientId: &quot;YOUR_CLIENT_ID&quot;, clientSecret: &quot;YOUR_CLIENT_SECRET&quot;, redirectUri: &quot;https://your-app.com/callback&quot;, }); </code></pre> <h2 id="best-practices">Best Practices</h2> <ul> <li>Never expose your API keys in client-side code</li> <li>Rotate your API keys periodically</li> <li>Use environment variables to store sensitive credentials</li> </ul> <pre class="prettyprint source"><code> </code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Math.html">Math</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-authentication.html">Authentication</a></li><li><a href="tutorial-getting-started.html">Getting Started</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>