Why is my Rich Presence not shown in Discord? - discord

I am using discord-rich-presence (which uses discord-rpc under the covers) to set my Rich Presence from my Electron app.
It authenticates and submits the activity and in the Discord DevTools I can see my request to set my activity:
const client = require('discord-rich-presence')(clientId);
client.updatePresence({
state: 'slithering',
details: 'Doing something',
startTimestamp: Date.now(),
largeImageKey: 'default',
smallImageKey: 'default',
instance: true,
joinSecret: 'redacted',
});
I am doing everything correctly and I can see my Rich Presence in other games so RP is definitely working. What am I doing wrong?
Can see it in other games:

Related

Can I identify if the a traffic is coming from facebook or somewhere else to log AddToCart Event Or Purshes Event on Facebook Pixels

To describe more the issue, I have a business manager account on Facebook and I have implemented everything as it should using React, my problem is when the event AddToCart is firing the count increases on Facebook analytics for AddToCart; event tho the user is coming lets from google or any other social media.
Is it applicable to only limited the events to be firing only if traffic comes from Facebook?
Root.tsx
ReactPixel.init('PIXEL ID', null, {
autoConfig: true,
debug: true,
})
ReactPixel.pageView()
on add to cart button a fire this action
ReactPixel.fbq('track', 'AddToCart', {
contents: [{ id: action.payload.sku, quantity: 1 }],
content_type: 'product',
value: action.payload.price,
currency: 'USD',
})
any advice would be helpful!

How do I avoid React Native GoogleSignIn by sending to google a password violation

I used #react-native-google-signin/google-signin": "^8.0.0" to create a google sign in button into my app.
When I used it, google recognised it as not trusted app, so send my an email to advice of a violation, and now every time I use a password saved on my google account to login on any site or application, he gives me a message telling me to change all of my passwords. I solved to remove the message, by ignoring for every passwords, almost 200 :/. But it's just temporary solution, cause if I do login again to my app it will happen again. How can I say to google that it is an app in developing, is there any mode to activate? Here's my code:
GoogleSignin.configure({
scopes: ['https://www.googleapis.com/auth/drive.readonly'], // what API you want to access on behalf of the user, default is email and profile
webClientId: '15299853035-njb79hdij6h1svo22drigurca1qb4djb.apps.googleusercontent.com', // client ID of type WEB for your server (needed to verify user ID and offline access)
offlineAccess: true, // if you want to access Google API on behalf of the user FROM YOUR SERVER
// hostedDomain: '', // specifies a hosted domain restriction
// forceCodeForRefreshToken: true, // [Android] related to `serverAuthCode`, read the docs link below *.
// accountName: '', // [Android] specifies an account name on the device that should be used
iosClientId: '15299853035-siujgcjtol0lfja83n7p6fk55cq6jinn.apps.googleusercontent.com', // [iOS] if you want to specify the client ID of type iOS (otherwise, it is taken from GoogleService-Info.plist)
// googleServicePlistPath: '', // [iOS] if you renamed your GoogleService-Info file, new name here, e.g. GoogleService-Info-Staging
// openIdRealm: '', // [iOS] The OpenID2 realm of the home web server. This allows Google to include the user's OpenID Identifier in the OpenID Connect ID token.
// profileImageSize: 120, // [iOS] The desired height (and width) of the profile image. Defaults to 120px
});
try {
await GoogleSignin.hasPlayServices();
const { idToken } = await (await GoogleSignin.signIn());
const googleCredential = await GoogleAuthProvider.credential(idToken);
await signInWithCredential(authApp, googleCredential)
.then(async(userCredential) => {
if(!authApp.currentUser.emailVerified)
{
sendEmailVerification(authApp.currentUser)
.then(() => {
// Email verification sent!
// ...
})
.catch((error)=>{
setLoading(false)
console.log(error)
})
}
......

how secure is context in react?

How secure is the context in react, I want to created a user from front end and set his indicial status to demo . later on when the user make a payment his status will change , bottom line is how secure this logic is could someone come and modify the initial set status to 'premium' ? so he could skip the payment part ?
const Signup = async (email: string, password: string, userType: string) => {
await createUserWithEmailAndPassword(auth, email, password)
.then((userCredential) => {
setDoc(doc(db, 'Data', userCredential.user.uid), {
user: userType,
verifiedEmail: false,
status: 'demo',
createdAt: Timestamp.now(),
});
As a rule of thumb and especially for single page applications which are rendered on the client side: Data from and (with)in clients can't and shouldn't be trusted as a security measurement.
So consider the context as "not secure" and always rely on proper permission management on the server side - so the worst thing which can happen is that your client may see the "premium" menus, but can't get anything out of it since the server denies any action.

Plaid Transaction Webhooks Not Firing When Using React Plaid Link

I am using ReactPlaidLink to build an app that retrieves users transaction history and displays it on the front end. My goal right now is to get the webhooks to fire at the specified endpoint. I set up an endpoint to listen for requests using both webhook.site and requestbin, and have not seen a request come through. I have specified the endpoint in both the React-Plaid. From what I understand form the documentation, specifying a webhook paramater is all that's necessary for the webhooks to fire to the right endpoint. I am definitely a novice when it comes to webhooks, I hope I'm not missing something super obvious. Would appreciate any insight you can offer.
<PlaidLinkButton
buttonProps={{
className:
"btn btn-large waves-effect waves-light hoverable blue accent-3 main-btn"
}}
plaidLinkProps={{
clientName: "BankLinker",
key:" ",
token: "my-token",
env: "sandbox",
product: ["transactions"],
webhook: 'https://webhook.site/465538a7-f2a5-4d55-b017-db23b949ef91',
onSuccess: this.handleOnSuccess,
}}
onScriptLoad={() => this.setState({ loaded: true })}
>
Add Account
</PlaidLinkButton>```
and HandleSuccess
```handleOnSuccess = (token, metadata) => {
const { accounts } = this.props;
const plaidData = {
public_token: token,
metadata: metadata,
accounts: accounts,
// webhook: "https://webhook.site/465538a7-f2a5-4d55-b017-db23b949ef91",
};
this.props.addAccount(plaidData);
};
I'm not an expert on the RN SDK, but on a quick glance I don't see anything glaringly, obviously wrong here. Can you confirm that you can go through the Link flow, wait a few seconds, and then call the /transactions/get endpoint, and successfully get data back from it? That will help confirm that the issue is with webhooks and not some other part of the process.

aws-amplify forgot password function with react js sending SMS instead of email

I build an app using aws-amplify that allows login with Cognito users. However, Auth.forgotPassword seems to be sending SMS to mobile device instead of EMAIL. How can I change the behavior such that it sends an email?
Here are related code:
Auth.forgotPassword(this.state.username)
.then(data => this.setState({instruction: 'An email has been sent to your email with a temporary password.', usernameError: false, passwordError: false}))
.catch(err => this.setState({instruction: err.message, usernameError: false, passwordError: false}));
You can configure what you need to verify when forgotPassword API is triggered in the AWS Cognito Console.
Amazon Cognito > Manage User Pool > Choose your pool > General Settings > MFA and verifications > Which attributes do you want to verify?
Also when you trigger the ForgotPassword API you get CodeDeliveryDetails Object in response
const result = await Auth.forgotPassword(username);
console.log(result);
CodeDeliveryDetails: {
"AttributeName": "email",
"DeliveryMedium": "EMAIL",
"Destination": "n***#g***.com"
}
From the result, you get on which medium the code has been delivered and accordingly notify the user in the app.

Resources