How to use the @nebular/auth.NbOAuth2GrantType.PASSWORD function in @nebular/auth

To help you get started, we’ve selected a few @nebular/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 akveo / nebular / src / playground / without-layout / auth / auth.module.ts View on Github external
redirect: {
              success: '/auth/login',
            },
          },
          errors: {
            key: 'data.errors',
          },
        }),
        NbOAuth2AuthStrategy.setup({
          name: 'password',
          clientId: 'test',
          clientSecret: 'secret',
          baseEndpoint: 'http://localhost:4400/api/auth/',
          token: {
            endpoint: 'token',
            grantType: NbOAuth2GrantType.PASSWORD,
            class: NbAuthOAuth2Token,
          },
          refresh: {
            endpoint: 'refresh-token',
            grantType: NbOAuth2GrantType.REFRESH_TOKEN,
          },
        }),
      ],
    }),
    NbSecurityModule.forRoot({
      accessControl: {
        guest: {
          view: ['news', 'comments'],
        },
        user: {
          parent: 'guest',
github akveo / nebular / src / playground / with-layout / oauth2-password / oauth2-password.module.ts View on Github external
error: true,
            success: false,
          },
          strategy: 'password',
        },
      },
      strategies: [
         NbOAuth2AuthStrategy.setup({
          name: 'password',
          clientId: 'Aladdin',
          clientSecret: 'open sesame',
          clientAuthMethod: NbOAuth2ClientAuthMethod.BASIC,
          baseEndpoint: 'http://localhost:4400/api/auth/',
          token: {
            endpoint: 'token',
            grantType: NbOAuth2GrantType.PASSWORD,
            class: NbAuthOAuth2JWTToken,
            requireValidToken: true,
          },
          redirect: {
            success: '/oauth2-password',
          },
        }),
      ],
    }),

    NbCardModule,
    NbLayoutModule,
    NbAlertModule,
    NbInputModule,
    Oauth2PasswordRoutingModule,
  ],
github akveo / nebular / assets / examples / oauth2-password / oauth2-password.module.ts View on Github external
error: true,
            success: false,
          },
          strategy: 'password',
        },
      },
      strategies: [
         NbOAuth2AuthStrategy.setup({
          name: 'password',
          clientId: 'Aladdin',
          clientSecret: 'open sesame',
          clientAuthMethod: NbOAuth2ClientAuthMethod.BASIC,
          baseEndpoint: 'http://localhost:4400/api/auth/',
          token: {
            endpoint: 'token',
            grantType: NbOAuth2GrantType.PASSWORD,
            class: NbAuthOAuth2JWTToken,
            requireValidToken: true,
          },
          redirect: {
            success: '/oauth2-password',
          },
        }),
      ],
    }),

    NbCardModule,
    NbLayoutModule,
    NbAlertModule,
    NbInputModule,
  ],
  declarations: [
github akveo / nebular / 3.6.2 / assets / examples / auth / auth.module.ts View on Github external
redirect: {
              success: '/auth/login',
            },
          },
          errors: {
            key: 'data.errors',
          },
        }),
        NbOAuth2AuthStrategy.setup({
          name: 'password',
          clientId: 'test',
          clientSecret: 'secret',
          baseEndpoint: 'http://localhost:4400/api/auth/',
          token: {
            endpoint: 'token',
            grantType: NbOAuth2GrantType.PASSWORD,
            class: NbAuthOAuth2Token,
          },
          refresh: {
            endpoint: 'refresh-token',
            grantType: NbOAuth2GrantType.REFRESH_TOKEN,
          },
        }),
      ],
    }),
    NbSecurityModule.forRoot({
      accessControl: {
        guest: {
          view: ['news', 'comments'],
        },
        user: {
          parent: 'guest',