如何为离子源代码提供安全性

问题描述 投票:0回答:1

嗨,这一直是我的问题,担心离子应用安全吗?是否有可能破解离子应用程序并获取内部代码或诸如此类的信息(例如,如果我的代码是这样的(向我的应用程序添加服务))

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';

@Injectable({
  providedIn: 'root'
})
export class EncryptionService {

  url = 'https://api.amnas....com';
   api-key='......'

  constructor(private http: HttpClient) { }

    newcheck(checkid: string ,cost: string,toname: string,tocode: string,passcode: string,date: string,checkfor: string,back: string): {
    return this.http.get(`${this.url}?key=${this.api-key}&checkid=${encodeURI(checkid)}&cost=${encodeURI(cost)}&toname=${encodeURI(toname)}&tocode=${encodeURI(tocode)}&passcode=${encodeURI(passcode)}&date=${encodeURI(date)}&checkfor=${encodeURI(checkfor)}&back=${encodeURI(back)}`);
}


}

任何人都可以破解我的导出应用程序(apk)并提取api-key吗?

javascript angular security ionic-framework ionic4
1个回答
0
投票

无论您如何构建应用程序,客户端都可以访问任何安全密钥,令牌等。您不能依赖构建中保留的任何秘密。

© www.soinside.com 2019 - 2024. All rights reserved.