mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-25 15:23:52 +00:00
24 lines
532 B
Plaintext
24 lines
532 B
Plaintext
#import "Bridging.h"
|
|
|
|
#include "base/logging.hpp"
|
|
#include "editor/server_api.hpp"
|
|
#include "platform/platform.hpp"
|
|
#include "private.h"
|
|
|
|
#import "MWMAuthorizationCommon.h"
|
|
|
|
using namespace osm;
|
|
|
|
@implementation Bridging
|
|
|
|
|
|
+ (void)saveOauthTokenFrom:(NSString * _Nonnull)oauthCode
|
|
{
|
|
NSString *oauthToken = @(OsmOAuth::ServerAuth().FinishAuthorization([oauthCode UTF8String]).c_str());
|
|
OsmOAuth::ServerAuth().SetAuthToken([oauthToken UTF8String]);
|
|
osm_auth_ios::AuthorizationStoreCredentials([oauthToken UTF8String]);
|
|
}
|
|
|
|
|
|
@end
|