
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
@startupjs/auth-facebook
Advanced tools
@startupjs/auth: >= 0.33.0
react-native-fbsdk: >= 1.0.0
Create here facebook app.
Copy client ID in config.json, as FACEBOOK_CLIENT_ID
.
Next, in the settings, copy the App Secret to config.json, as FACEBOOK_CLIENT_SECRET
.
Importing a strategy:
import { Strategy as FacebookStrategy } from '@startupjs/auth-facebook/server'
Importing lib for config:
import conf from 'nconf'
In startupjsServer, in the strategy of the initAuth function need to add FacebookStrategy:
initAuth(ee, {
strategies: [
new FacebookStrategy({
clientId: conf.get('FACEBOOK_CLIENT_ID'),
clientSecret: conf.get('FACEBOOK_CLIENT_SECRET'),
})
]
})
1 - Create an account Firebase, if not already created. 2 - Next, in the Authentication tab, enable authorization via Facebook by entering the required data. 3 - Copy the redirect URL, and paste in app settings (Log in via Facebook -> Settings -> Valid redirect URIs for OAuth).
In android/app/src/main/res/values
, need to add (Where FACEBOOK_CLIENT_ID
is the id of the current app):
<string name="facebook_app_id">FACEBOOK_CLIENT_ID</string>
In android/app/src/main/AndroidManifest.xml
, in the application tag, you need to add:
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
In Facebook developers, in the settings, at the very bottom ** Add platform, choose Android, next click on the button Get started quickly. Enter the data in the lower tab Tell us about the project for Android
Next, we generate and enter the necessary keys.
Update the `pod install ' dependencies.
In Info.plist, at the very end, up to the last </dict></plist>
, you need to add:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fbFACEBOOK_CLIENT_ID</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>FACEBOOK_CLIENT_ID</string>
<key>FacebookDisplayName</key>
<string>startupjs-auth</string>
FACEBOOK_CLIENT_ID - replace with the desired id. FacebookDisplayName - on the right one.
You can use the component
import { AuthButton as FacebookAuthButton } from '@startupjs/auth-facebook/client'
Or a helper
import { onLogin } from '@startupjs/auth-facebook/client'
Div.custom(onPress=onLogin)
FAQs
Auth plugin for StartupJS auth module
We found that @startupjs/auth-facebook demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.