0.2.5 • Published 2 years ago

@jfront/oauth-user v0.2.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

oauth-context

React Web implementation.

Usage

Simple usage in React SPA. Uses Authorization Code Grant with PKCE extension by default.

import React from "react"
import { OAuthWebContext, OAuthSecuredFragment } from "@jfront/oauth-ui"

function App() {
  return (
    <OAuthWebContext
      clientId={"243j24h246j242gjikh6kllnn5l"} //application client_id
      redirectUri={"http://localhost/app/oauth"} //library uses scheme:[//authority]/context_path/oauth url as default callback endpoint
      oauthContextPath={"http://localhost/oauth/api"} //oauth API base url
    >
      <OAuthSecuredFragment>
        <div>Logged in</div>
      </OAuthSecuredFragment>
    </OAuthWebContext>
  )
}
0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago