
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@fluido/react-profile-manager
Advanced tools
Consiste num provedor de React para abstração do FirebaseAuth
import ProfileProvider from '@fluido/react-profile-manager'
function App() {
return (
<ProfileProvider
firebaseApp={FirebaseApp}
pathname={currentRoute}
refreshTokenTime={currentRoute}
FCMKey={FirebaseCloudMessageKey}
onCallRedirectToPublic={function handlePathnameUnauthorized() {}}
onCallRedirectToAuthenticated={function handlePathnameAuthorizedBlock() {}}
unauthenticatedRoutes={['/', '/home', '/login']}
authenticatedRoutes={['/dashboard']}>
<YourRoutes>...</YourRoutes>
</ProfileProvider>
)
}
import { useProfile } from '@fluido/react-profile-manager'
function MyComponent() {
const { ready, logged, user, token, FCMToken, FCMState, claims } =
userProfile()
return <div></div>
}
Parâmetro | default | Tipo | Descrição |
---|---|---|---|
firebaseApp | undefined | FirebaseApp | aplicativo firebase inicializado |
refreshTokenTime | 20 | number | tempo em segundos que o token será atualizado |
pathname | undefined | string | caminho URL para comparação das rotas autenticadas e não autenticadas |
FCMKey | undefined | string | chave para o Firebase Cloud Message |
onCallRedirectToPublic | undefined | () => {} | função é chamada quando pathname está incluso na lista authenticatedRoutes |
onCallRedirectToAuthenticated | undefined | () => {} | função é chamada quando pathname está incluso na lista unauthenticatedRoutes |
unauthenticatedRoutes | ['/login'] | string[] | lista de caminhos que chama a função onCallRedirectToAuthenticated com o usuário já autenticado |
authenticatedRoutes | [] | string[] | lista de caminhos que chama a função onCallRedirectToPublic sem usuário autenticado |
Parâmetro | Tipo | Descrição |
---|---|---|
ready | boolean | true se o FirebaseAuth já carregou os dados do usuário |
logged | boolean | true se o usuário está autenticado |
user | FirebaseUser | dados do usuário autenticado |
token | string | token de acesso do usuário |
FCMToken | string | token identificador do FCM Z |
FCMState | 'loading' | 'ready' | 'require' | 'error' | estado em que se encontra o FCM |
claims | string | string[] | dados do usuário armazenado no FirebaseFirestore |
FAQs
Fluido profile manager
We found that @fluido/react-profile-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.