today i have a lil problem for recognize this combination hash is work, im looking when im log into my account in some apps, but i get this hash, and change everytime when i login, even with same password / pin, can someone help me about what is combination is ? im trying to create some desktop apps for personal use.. here the json what body post
{
"rdVerifyInfo": {
"publicKeyP": "3",
"publicKeyAuthen": "pk2",
"softTokenActivated": true,
"dataKey": "ndTWGXgb/D7CeotrgxbtPzQ8jwsJJgz5MaaL5WXtDeXQ0mGkbe1zILYzYoXtcaADQn/rQsBAbl28JAWOgQvU1lq7/r/Vqp/uuCDGcdn2I7AyPq5xeIVdtKuy9/sKq08zs86xRDpNijWYSxIG+iyvatPR+0RFRl7qeysGl6LHpJ6EdwQqOBA0wv6xIAGMmUm4fEgcynHWHuvoPHaY8zhSR40+CLeZm8/WnqwzO9ihtlCy7UU5lLUbcXKJb3MTSea5I1vw2d2oVf+EUqkgoGSCpz4XEd9lagm05SiYnLgMKvv4x7FCKprOuf0pwVBBrun6AS0TvUrMQeKe9affcibyVg==",
"clientCached": 0,
"softToken": "419443",
"publicKeyH": "5",
"data": "swYbclHywLKoY8GsRYw1cz8JrWJKLCSp+qYhLZih0JvOVIpGiFgRHx4MazBslSEI3Mn+dtNp4oSPq93AVrDhf0N4sVfz9lnOyFM1j5TVND/Bl6J0Wpx35QiT9w5rdnfVI+rfBBCCJKIsrvvc8eERRDRBEtMEPl0Sen51AFN+YDEgncqLqs9NMoxsOZU/Sq1g0Aj9vHPogoe2eoGAIJfgCHY/WDh4oZDR6+sxrky4BsV1gI5PEeKpOpgzC4+hXkE5wc7bdIhJfMMn2UAFsRaz3l2MEPZSnyTAfkJtaV2Yem5cTbTNRt4wmSxgVPq8lNIZFhBK9/DN7N83b51X+iekZ17COzLc2ucaBoz5RxhGfoUAtoW+3Yc+TXU4Pwe5Ax33qmbqIfn+5AJyVxrSVIxvnq7HsgpOKjGo61bibXD/kGKds/tqt+3MMoX/yCFlpLEMegstaeIFFH6bd7A3NH/A3jQGbVnWCtN5UCOwQ5ar+Q/KFPPLUCgYiYG66+/cHajUIihQX4Um7qtKhMAgn/R4/rDBgGMrD0wo3EguVUwMEpbPHWC2Mbhyk2gei6xWTe7aelsdlG5ChnZkMLau0eO6e3xthwONXG9B+FRAdz4t7yYK6xsyZ55X0vvvuzIeRW9PNSuOlwCPT5pEdM+0p1Nakf6ncbZ99UeCAlNspsW2vhp9I6tQ2tUk7WgXH/BDUnF/6+BR0HYRH3QhH31I/HYxcGcIxa6cGe1IXH+m9Fm+uRifVfnKMenQaSAkWdSvD6iy3imHjJSm6rpBeQxjuOM1Y3ogWqlk1ZWuIlpufM7roIHtOZs2aY7QDNRFoh+ZS9qw3V9JBNPGhwUBJBvEPC9BHLXp6JKZQyNKn9piX/cYzFeilfsK/MzYJ9lwSRvZ+8Ppd82mJsmc93RPia/SQwy3NjZueEF6nBCIt2OxlQmvVmE=",
"random": "1670082073462_1569060844",
"deviceFingerprint": "1670082071590|49|kD7X+O+YmGNSQK+Pt9TCVThgA835mFptacKw51GwMzL7ksIpJGcXZbVIfC2D0Ntw5IZ57aI=|ujMFdCiBFl43liyc|zvfvmDWtH7A7WA10uwczag==|02",
"action": "LOGIN_PASSWORD_VERIFY"
},
"loginType": "PIN",
"scene": "LOGIN",
"encryUid": "N1G0Z6SMcHx2DBGLgjpPkg==",
"step": "BE",
"cyCode": "62"
}
is anyone familier with this hash combination ? im stuck.
Knowing About Combination Hash
Related
Assuming that I have a whole user object as a JSON (with its access and refresh tokens) - how can I force firebase/auth to accept it as its currentUser so it triggers e.g. onTokenIdChange?
EDIT:
I want to authenticate the user on a website (my app #1), and inform the browser extension (my app #2) if successful. Right now I'm passing the JSON representation of a user returned from the website's onTokenIdChange to the extension.
EDIT2:
This is the user's JSON I'm referring to:
{
"uid": "some-uid-here",
"email": "john#example.com",
"emailVerified": false,
"isAnonymous": false,
"providerData": [
{
"providerId": "password",
"uid": "john#example.com",
"displayName": null,
"email": "john#example.com",
"phoneNumber": null,
"photoURL": null
}
],
"stsTokenManager": {
"refreshToken": "my-refresh-token",
"accessToken": "my-access-token",
"expirationTime": 1664750677967
},
"createdAt": "1664712317951",
"lastLoginAt": "1664740255685",
"apiKey": "my-api-key",
"appName": "[DEFAULT]"
}
Passing the user profile around is not enough to authenticate a user with. If you want to authenticate the user in a different context, you'll have to pass their credentials around or mint a custom token for them and sign them in with that.
Not sure if I understood the question, but as far as I know, you have to either
Use one of the default signIn methods (like signInWithEmailAndPassword), which requires user input; I think you are chasing something different
Use the custom token approach mentioned by Frank. In that case, your backend application will use the firebase-admin-sdk to generate custom tokens for a given user, acording to the business logic you desire. Only after that your frontend application will use the firebase/auth lib to run the signInWithCustomToken, which will log you in.
Example: your app #2 must have a way to communicate with your backend in order to retrieve a custom token for the given user
When I click I a link (or am getting redirected by a site), I want to replace the values of assorted tracking parameters in the requested URL with a different, universal value. For this example, let's use my username, so a link that directs to
www.abc.com/?utm_source=originalsource&utm_campaign=originalcampaign&cid=originalcid&gclid=originalgclid
would become www.abc.com/?utm_source=WTTDOTM&utm_campaign=WTTDOTMcampaign&cid=WTTDOTM&gclid=WTTDOTM
It’s important that these parameters get edited before the request is sent off, as the idea is to avoid the UTM/cid/gclid/etc tracking and leave a mark in the traffic data of whoever is looking at those tracking parameters. I know I have to use webRequest, and the logic seems pretty simple, but I don’t know how to find-and-replace in the URL on the fly with js. This answer looks like its the closest to what I’m asking, but I don’t know how it would work with just modifying smaller slices of a URL as I'm pretty inexperienced with javascript and most of my coding knowledge is just slapping stuff together until it works.
To start with a simple sub-problem my question is: how can I use the webRequest API to replace utm_campaign=*** in a URL with utm_campaign=WTTDOTM before the page is requested?
----EDIT:-----
#wOxxOm thank you for your helpful answer! I think I have the general structure down now, but I am still struggling with the formatting of regex rules, which I'm pretty unfamiliar with. The way I understand it, the rule ^(.*?utm_source=)(.+?(?=\\&)|$)(.*) (and its "medium" variant) will capture all values before 'utm_source=' into group 1 and all values (or none in the case of it being the last parameter) after '&' into group 3 and then I should be able to make the regexSubstition group1+WTTDOTM+group3, right? When I currently try to upload the unpacked extension below, I get hit with an error that says "rules.json: Rule with id 1 specifies an incorrect value for the "regexFilter" key." I think I am just formatting it wrong, but I do not know what I need to fix. Can you help? Here are my rules.json and manifest.json files.
rules.json
[
{
"id": 1,
"priority": 1,
"action": {
"type": "redirect",
"redirect": {
"regexSubstitution": "\\1WTTDOTM\\3"
}
},
"condition": {
"regexFilter": "^(.*?utm_source=)(.+?(?=\\&)|$)(.*)",
"resourceTypes": [
"main_frame"
]
}
},
{
"id": 2,
"priority": 2,
"action": {
"type": "redirect",
"redirect": {
"regexSubstitution": "\\1WTTDOTM\\3"
}
},
"condition": {
"regexFilter": "^(.*?utm_medium=)(.+?(?=\\&)|$)(.*)",
"resourceTypes": [
"main_frame"
]
}
}
]
manifest.json
{
"manifest_version": 2,
"name": "WTTDOTM is a UTM",
"version": "1.3",
"permissions": [
"declarativeNetRequest",
"declarativeNetRequestFeedback",
"<all_urls>"
],
"description": "Replaces all UTM values with 'WTTDOTM'",
"declarative_net_request" : {
"rule_resources" : [{
"id": "1",
"enabled": true,
"path": "rules.json"
},
{
"id": "2",
"enabled": true,
"path": "rules.json"
}],
"icons": {
"128": "icon128.png" }
}
}
It's probably not impossible to do this with regular expressions but it's going to be frustrating. The text that you're trying to capture could contain almost anything, so building a regex that captures what's after each query parameter and only what's after each query parameter is going to be difficult. Instead I would suggest using Chrome's built in URLSearchParams API.
Combined with Javascript's URL object, what you're trying to do would probably look like this:
const replaceTrackerParams = (urlString, replacementString) => {
const url = new URL(urlString);
const params = new URLSearchParams(url.search);
// If campagin parameters exist, replace them
params.has('utm_source') && params.set('utm_source', replacementString)
params.has('utm_campaign') && params.set('utm_campaign', replacementString)
// Return modified URL
return url.hostname + '?' + params.toString()
}
Replace shorthand syntax with more complicated logic as needed.
Another answer suggested using declarativeNetRequest because it is the newer, more efficient API. This is true, but I don't think it supports callback functions yet.
I would like to get the live results from an Api endpoint preferably using javascript, nodejs. I am looking for more like a technique or idea how to handle this.
Api response looks as following:
[
{
"id": 6,
"team1": {
"name": "Home Team",
"goals": 2
},
"team2": {
"name": "Away Team",
"goals": 1
},
"starting": "2018-09-14T15:30:00Z"
}
]
Probably one way I can think of doing is making a new request every second and get up to date. So each time a team scores this api changes so I get the latest score goal results.
What is the best way I can handle this without overwhelming the resources of the server or probably not get banned from the API Endpoint if I am doing too many requests.
I'm still trying to write a function in JavaScript where the user can type in an artist, and it will return a link to that artist's SoundCloud page.
For example,
/artist beyonce --> https://soundcloud.com/beyoncemusic
But the SoundCloud URLS don't all act the same. For example,
/artist dave matthews band --> https://soundcloud.com/dave-matthews-band.
For this reason, I can't simply just output scLink/artistName because they all have different URLs. I'm using Node.js, so I looked through a lot of npm packages, but couldn't figure out how to use any for this purpose. Perhaps Soundclouder will work somehow (though I couldn't figure it out myself). Does anyone know how I could write a command like this?
You are using the SoundCloud API, right?
A simple HTTP request to the right API should return the data you want. For example:
http://api.soundcloud.com/users.json?q=beyonce
[
{
"id": 4293843,
"kind": "user",
"permalink": "beyoncemusic",
"username": "Beyoncé",
"uri": "http://api.soundcloud.com/users/4293843",
"permalink_url": "http://soundcloud.com/beyoncemusic",
"avatar_url": "http://i1.sndcdn.com/avatars-000036935308-a2acxy-large.jpg?435a760",
"country": "United States",
"full_name": "Beyoncé",
"description": "",
"city": "New York",
"discogs_name": null,
"myspace_name": "beyonce",
"website": "http://www.beyonceonline.com",
"website_title": "",
"online": false,
"track_count": 33,
"playlist_count": 2,
"plan": "Pro Plus",
"public_favorites_count": 0,
"followers_count": 478783,
"followings_count": 0,
"subscriptions": [
{
"product": {
"id": "creator-pro-unlimited",
"name": "Pro Unlimited"
}
}
]
},
...
]
...so you could just do results[0].permalink_url.
You can use the request module to make the HTTP request manually, or use soundclouder to handle SoundCloud API's authentication details.
Most of the above does not apply if you want to make the actual requests from a browser. (The question is tagged node.js, but it sounds like you want to do this from a web page.)
If you're doing this from a webpage, use the SoundCloud JS SDK. The data you get back will look like the example above.
I don't think you'd be able to get an exact match reliably. Your best bet would be to search for users with the string you are looking for - example: "beyonce" and then to show the results and let them pick the correct link. You may be able to filter out likely results with follower count (high follower count) or something after you've pulled the initial list from soundcloud.
Search code:
users = SC.get('/users', { q: 'beyonce' });
Then iterate over users and display the permalink url. Hope this helps.
I am trying to get the duration of a youtube video via search
var request = gapi.client.youtube.search.list({
q: q,
type : "video",
maxResults : 10,
part: 'snippet,contentDetails'
});
as an additional part parameter I added contentDetails in order to get the duration as you can see in their doc.
https://developers.google.com/youtube/v3/getting-started
Now comes the silly part. The response I get is the following:
[
{
"error": {
"code": -32602,
"message": "contentDetails",
"data": [
{
"domain": "youtube.part",
"reason": "unknownPart",
"message": "contentDetails",
"locationType": "parameter",
"location": "part"
}
]
},
"id": "gapiRpc"
}
]
"As such, the part parameter requires you to select the resource components that your application actually uses"
Thats what I did and now they dont know their own parameter anylonger?
So I was wondering how can I retrieve the duration order contentDetails in general?
best
phil
As written in the document, for search->list call, part can only take value "snippet".
Depending on the kind of the response, as a secondary call, you can do one of videos->list, playlists->list, channels->list with the id and part=snippet,contentDetails to get more details of each result item.