How to use the netlify-cms-lib-auth.ImplicitAuthenticator function in netlify-cms-lib-auth

To help you get started, we’ve selected a few netlify-cms-lib-auth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github netlify / netlify-cms / packages / netlify-cms-backend-bitbucket / src / AuthenticationPage.js View on Github external
componentDidMount() {
    const authType = this.props.config.getIn(['backend', 'auth_type']);
    if (authType === 'implicit') {
      this.auth = new ImplicitAuthenticator({
        base_url: this.props.config.getIn(['backend', 'base_url'], 'https://bitbucket.org'),
        auth_endpoint: this.props.config.getIn(
          ['backend', 'auth_endpoint'],
          'site/oauth2/authorize',
        ),
        app_id: this.props.config.getIn(['backend', 'app_id']),
        clearHash: this.props.clearHash,
      });
      // Complete implicit authentication if we were redirected back to from the provider.
      this.auth.completeAuth((err, data) => {
        if (err) {
          this.setState({ loginError: err.toString() });
          return;
        }
        this.props.onLogin(data);
      });
github netlify / netlify-cms / packages / netlify-cms-backend-gitlab / src / AuthenticationPage.js View on Github external
componentDidMount() {
    const authType = this.props.config.getIn(['backend', 'auth_type']);
    if (authType === 'implicit') {
      this.auth = new ImplicitAuthenticator({
        base_url: this.props.config.getIn(['backend', 'base_url'], 'https://gitlab.com'),
        auth_endpoint: this.props.config.getIn(['backend', 'auth_endpoint'], 'oauth/authorize'),
        app_id: this.props.config.getIn(['backend', 'app_id']),
        clearHash: this.props.clearHash,
      });
      // Complete implicit authentication if we were redirected back to from the provider.
      this.auth.completeAuth((err, data) => {
        if (err) {
          this.setState({ loginError: err.toString() });
          return;
        }
        this.props.onLogin(data);
      });
    } else {
      this.auth = new NetlifyAuthenticator({
        base_url: this.props.base_url,

netlify-cms-lib-auth

Shared authentication functionality for Netlify CMS.

MIT
Latest version published 3 years ago

Package Health Score

59 / 100
Full package analysis